mirror of
https://github.com/monero-project/monero.git
synced 2024-10-01 11:49:47 -04:00
Merge pull request #3970
3381b651
abstract_tcp_server2: fix busy calling of idle IO service (moneromooo-monero)
This commit is contained in:
commit
dd973179ad
@ -393,7 +393,7 @@ PRAGMA_WARNING_DISABLE_VS(4355)
|
||||
//ask it inside(!) critical region if we still able to go in event wait...
|
||||
size_t cnt = socket_.get_io_service().poll_one();
|
||||
if(!cnt)
|
||||
misc_utils::sleep_no_w(0);
|
||||
misc_utils::sleep_no_w(1);
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -889,7 +889,9 @@ POP_WARNINGS
|
||||
{
|
||||
try
|
||||
{
|
||||
io_service_.run();
|
||||
size_t cnt = io_service_.run();
|
||||
if (cnt == 0)
|
||||
misc_utils::sleep_no_w(1);
|
||||
}
|
||||
catch(const std::exception& ex)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user