hacker-cb / modbus-dart

BSD 3-Clause "New" or "Revised" License
37 stars 22 forks source link

TcpConnector's close method didn't call 'destroy' on socket #2

Closed Gnitry closed 4 years ago

Gnitry commented 4 years ago

TcpConnector's 'close' method didn't call 'close' method on the underlying socket. Accoring to the this and this 'close' method only closes outgoing stream. It leads to always running application (for example Example/main.dart), because application is waiting for asynchronous reading operation.

Also, I think it is better to flush the outgoing channel when socket is closing.

hacker-cb commented 4 years ago

Fixed in 397e03ada100dbaa56b98e32d10726ccae1769e5 Thank you.