Skip to content

Commit

Permalink
Merge pull request #25 from RikitoNoto/release/1.3.3
Browse files Browse the repository at this point in the history
Release/1.3.3
  • Loading branch information
RikitoNoto committed Jul 2, 2023
2 parents 4a84eda + 4b6c943 commit c44183b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ change links in README.md to github repository, and change logo size.
change the folder name of exsample to example.
### 1.3.2
fix didn't call close method.
### 1.3.3
fix didn't call close method of stream.
6 changes: 6 additions & 0 deletions lib/tcp.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class Tcp implements Communicator<Socket, SocketConnectionPoint> {
final Map<Socket, CommunicateDataTcp> _receiveBuffers = {};
final List<Socket> _connection = [];
final List<ServerSocket> _servers = [];
final List<StreamController> _streams = [];

@override
Future<Socket> connect(SocketConnectionPoint connectionPoint) async {
Expand All @@ -63,6 +64,10 @@ class Tcp implements Communicator<Socket, SocketConnectionPoint> {
for(ServerSocket server in _servers){
await server.close();
}

for(StreamController controller in _streams){
await controller.close();
}
}

@override
Expand All @@ -77,6 +82,7 @@ class Tcp implements Communicator<Socket, SocketConnectionPoint> {
SocketConnectionPoint bind) async {
final StreamController<CommunicateData<Socket>> controller =
StreamController();
_streams.add(controller);
ServerSocket serverSocket = await _bind(bind.address, bind.port);
_servers.add(serverSocket);
// connection
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: camel
description: A Flutter package for communicating in a local network.
version: 1.3.2
version: 1.3.3
homepage:

environment:
Expand Down

0 comments on commit c44183b

Please sign in to comment.