mirror of
https://github.com/SChernykh/p2pool.git
synced 2025-01-08 19:59:30 +00:00
Fixed socket leak after a failed connection
This commit is contained in:
parent
d246ee1552
commit
230d3e4780
1 changed files with 1 additions and 0 deletions
|
@ -573,6 +573,7 @@ void TCPServer<READ_BUF_SIZE, WRITE_BUF_SIZE>::on_connect(uv_connect_t* req, int
|
|||
LOGWARN(5, "failed to connect to " << static_cast<char*>(client->m_addrString) << ", error " << uv_err_name(status));
|
||||
}
|
||||
server->on_connect_failed(client->m_isV6, client->m_addr, client->m_port);
|
||||
uv_close(reinterpret_cast<uv_handle_t*>(&client->m_socket), nullptr);
|
||||
server->m_preallocatedClients.push_back(client);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue