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:
parent
fb66419791
commit
cc49a7fb15
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue