Skip to content

Commit

Permalink
Fix port leak (#196)
Browse files Browse the repository at this point in the history
fixes #192
  • Loading branch information
rrousselGit authored Oct 20, 2023
1 parent 49e8db0 commit e8941b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/custom_lint/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- Fix watch mode not quitting with `q` (thanks to @kuhnroyal)
- Improve the command line's output (thanks to @kuhnroyal)
- Update uuid to 4.0.0
- Fixed a port leak

## 0.5.3 - 2023-08-29

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ import 'protocol.dart';

Future<int> _findPossiblyUnusedPort() {
return SocketCustomLintServerToClientChannel._createServerSocket()
.then((value) => value.port);
.then((value) {
final port = value.port;
value.close();
return port;
});
}

Future<T> _asyncRetry<T>(
Expand Down

1 comment on commit e8941b7

@vercel
Copy link

@vercel vercel bot commented on e8941b7 Oct 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.