[monero-project/monero] abstract_tcp_server2: restart async accept on error (#3997)

moneromooo-monero commented on this pull request.

> @@ -1003,8 +1003,23 @@ POP_WARNINGS
}else
{
_erro(«Some problems at accept: » << e.message() << ", connections_count = " << m_sock_count); + misc_utils::sleep_no_w(100); + new_connection_.reset(new connection(io_service_, m_config, m_sock_count, m_sock_number, m_pfilter, m_connection_type));

It *seems* it might be able to be moved from the main code after the start call etc. Not sure whether that call can take a while in specal cases, which would make the server reject connections while that’s going on. The two ones on the error paths definitely can be though.

Добавить комментарий