Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flush and close the connection #11

Open
HelloBytes opened this issue Dec 15, 2020 · 0 comments
Open

flush and close the connection #11

HelloBytes opened this issue Dec 15, 2020 · 0 comments

Comments

@HelloBytes
Copy link

In some occasions on some devices, when you scan the network and after it's done connect to that device on the same port the connection is not closed properly.

My proposal is to add flush and close before destroy:

final Socket s = await Socket.connect(host, port, timeout: timeout); await s.flush(); await s.close(); s.destroy();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant