wistia / nsq-ruby

NSQ Ruby client
MIT License
68 stars 27 forks source link

Close the TcpSocket when closing the connection #35

Closed leklund closed 7 years ago

leklund commented 7 years ago

As mentioned in #34, when close_connection is called, the Socket isn't actually close, just set to nil. This can leave open sockets hanging around which can end up causing issues.

ghost commented 7 years ago

@leklund, thanks for your PR! By analyzing the annotation information on this pull request, we identified @bschwartz, @freerobby and @alieander to be potential reviewers

leklund commented 7 years ago

Just released that this won't work with TLS because the @socket is re-used and it won't respond to close. Both the SSL socket and the TCP socket need to be closed. Will fix and re-open.