Fix: uv_close was called from wrong thread

This commit is contained in:
SChernykh
2022-10-07 16:02:08 +02:00
parent 3e655961e9
commit fd6b2360aa
5 changed files with 21 additions and 8 deletions
+5 -2
View File
@@ -84,8 +84,6 @@ StratumServer::StratumServer(p2pool* pool)
StratumServer::~StratumServer()
{
uv_close(reinterpret_cast<uv_handle_t*>(&m_blobsAsync), nullptr);
shutdown_tcp();
uv_mutex_destroy(&m_blobsQueueLock);
@@ -935,6 +933,11 @@ void StratumServer::on_after_share_found(uv_work_t* req, int /*status*/)
}
}
void StratumServer::on_shutdown()
{
uv_close(reinterpret_cast<uv_handle_t*>(&m_blobsAsync), nullptr);
}
StratumServer::StratumClient::StratumClient()
: m_rpcId(0)
, m_perConnectionJobId(0)