fix assertion when sending a udp packet to a closed socket

This can happen particularly during shutdown. We should eventually get to a
point where this doesn't happen, but since we close the sockets immediately
upon initiating shutdown it's hard to avoid for now.
This commit is contained in:
Steven Siloti 2018-11-27 19:30:17 -08:00 committed by Arvid Norberg
parent fb66419791
commit cc49a7fb15
1 changed files with 1 additions and 1 deletions

View File

@ -2306,7 +2306,7 @@ namespace aux {
auto s = std::static_pointer_cast<session_udp_socket>(si);
TORRENT_ASSERT(s->sock.local_endpoint().protocol() == ep.protocol());
TORRENT_ASSERT(s->sock.is_closed() || s->sock.local_endpoint().protocol() == ep.protocol());
s->sock.send(ep, p, ec, flags);