Zero out invalid socket ID on disconnect to avoid repeatedly erroring on read/write.
parent
6d8f7e5b5d
commit
b7f8d3c5c2
|
@ -471,7 +471,8 @@ void TcpConnectionHandler::disconnectImpl_()
|
|||
#else
|
||||
close(socket_);
|
||||
#endif // defined(WIN32)
|
||||
|
||||
socket_ = -1;
|
||||
|
||||
onDisconnect_();
|
||||
|
||||
if (enableReconnect_)
|
||||
|
|
Loading…
Reference in New Issue