Skip to content

Commit

Permalink
client in PC_ST_INITED state don't need to close TCP handle.
Browse files Browse the repository at this point in the history
  • Loading branch information
xpol authored and Wang Xinyong committed Apr 25, 2016
1 parent e24f8de commit 4e3d587
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tr/uv/tr_uv_tcp_aux.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ void tcp__reset(tr_uv_tcp_transport_t* tt)

uv_read_stop((uv_stream_t* )&tt->socket);

if (!uv_is_closing((uv_handle_t*)&tt->socket)) {
if (tt->client->state != PC_ST_INITED
&& !uv_is_closing((uv_handle_t*)&tt->socket)) {
uv_close((uv_handle_t*)&tt->socket, NULL);
}

Expand Down

0 comments on commit 4e3d587

Please sign in to comment.