|
|
@ -277,10 +277,20 @@ namespace transport |
|
|
|
if (ecode != boost::asio::error::operation_aborted) |
|
|
|
if (ecode != boost::asio::error::operation_aborted) |
|
|
|
{ |
|
|
|
{ |
|
|
|
LogPrint (eLogError, "SSU2: Receive error: code ", ecode.value(), ": ", ecode.message ()); |
|
|
|
LogPrint (eLogError, "SSU2: Receive error: code ", ecode.value(), ": ", ecode.message ()); |
|
|
|
auto ep = socket.local_endpoint (); |
|
|
|
if (m_IsThroughProxy) |
|
|
|
socket.close (); |
|
|
|
{ |
|
|
|
OpenSocket (ep); |
|
|
|
m_UDPAssociateSocket.reset (nullptr); |
|
|
|
Receive (socket); |
|
|
|
m_ProxyRelayEndpoint.reset (nullptr); |
|
|
|
|
|
|
|
m_SocketV4.close (); |
|
|
|
|
|
|
|
ConnectToProxy (); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
auto ep = socket.local_endpoint (); |
|
|
|
|
|
|
|
socket.close (); |
|
|
|
|
|
|
|
OpenSocket (ep); |
|
|
|
|
|
|
|
Receive (socket); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|