TCPServer: stop reading before closing connection

This commit is contained in:
SChernykh 2021-08-25 16:19:21 +02:00
parent 662865ad70
commit 46b7c3e755

View file

@ -821,6 +821,8 @@ void TCPServer<READ_BUF_SIZE, WRITE_BUF_SIZE>::Client::close()
return;
}
uv_read_stop(reinterpret_cast<uv_stream_t*>(&m_socket));
uv_tcp_t* s = &m_socket;
uv_handle_t* h = reinterpret_cast<uv_handle_t*>(s);
if (!uv_is_closing(h)) {