Merge pull request #2 from hyc/cmds

Tweak command handling
This commit is contained in:
SChernykh
2021-08-24 14:37:03 +03:00
committed by GitHub
4 changed files with 111 additions and 37 deletions

View File

@@ -659,6 +659,17 @@ static bool init_signals()
return true;
}
void p2pool::stop()
{
uv_async_t asy;
uv_loop_t *loop = uv_default_loop();
/* use async handle to make sure event loops wake up and stop */
uv_async_init(loop, &asy, NULL);
uv_stop(loop);
uv_async_send(&asy);
}
int p2pool::run()
{
if (!m_params->ok()) {