Close sockets upon errors
This commit is contained in:
@@ -138,7 +138,7 @@ void MulticastDnsClientImpl::HandleQueryTimeout(const asio::error_code & error)
|
||||
}
|
||||
else
|
||||
{
|
||||
m_socket.cancel();
|
||||
m_socket.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@ void UdpClientImpl::CheckDeadline()
|
||||
{
|
||||
if (m_deadline.expires_at() <= std::chrono::system_clock::now())
|
||||
{
|
||||
m_answerSocket.cancel();
|
||||
m_answerSocket.close();
|
||||
m_deadline.expires_at(asio::system_timer::time_point(std::chrono::system_clock::duration::max()));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user