Fixed a rare crash on exit
This commit is contained in:
@@ -315,7 +315,7 @@ int CurlContext::on_timer(CURLM* /*multi*/, long timeout_ms)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (timeout_ms == 0) {
|
if ((timeout_ms == 0) && !uv_is_closing(reinterpret_cast<uv_handle_t*>(&m_async))) {
|
||||||
// 0 ms timeout, but we can't just call on_timeout() here - we have to kick the UV loop
|
// 0 ms timeout, but we can't just call on_timeout() here - we have to kick the UV loop
|
||||||
const int result = uv_async_send(&m_async);
|
const int result = uv_async_send(&m_async);
|
||||||
if (result < 0) {
|
if (result < 0) {
|
||||||
|
|||||||
@@ -124,7 +124,9 @@ void p2pool_api::dump_to_file_async_internal(Category category, const char* file
|
|||||||
m_dumpData[path] = std::move(buf);
|
m_dumpData[path] = std::move(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
uv_async_send(&m_dumpToFileAsync);
|
if (!uv_is_closing(reinterpret_cast<uv_handle_t*>(&m_dumpToFileAsync))) {
|
||||||
|
uv_async_send(&m_dumpToFileAsync);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void p2pool_api::dump_to_file()
|
void p2pool_api::dump_to_file()
|
||||||
|
|||||||
Reference in New Issue
Block a user