[wpinet] uv: Stop creating handles when closing loop (#5102)

This prevents EventLoopRunner::Stop() from hanging in the case when
new handles are created after the async walk closes all the handles.
This commit is contained in:
Peter Johnson
2023-02-16 22:49:14 -08:00
committed by GitHub
parent 805c837a42
commit 8068369542
29 changed files with 300 additions and 82 deletions

View File

@@ -21,6 +21,9 @@ DsClient::DsClient(wpi::uv::Loop& loop, wpi::Logger& logger,
: m_logger{logger},
m_tcp{uv::Tcp::Create(loop)},
m_timer{uv::Timer::Create(loop)} {
if (!m_tcp || !m_timer) {
return;
}
m_tcp->end.connect([this] {
WPI_DEBUG4(m_logger, "DS connection closed");
clearIp();