Browse Source

close relay socket if associate socket gets closed

pull/1797/head
orignal 2 years ago
parent
commit
4ed4e8708e
  1. 2
      libi2pd/SSU2.cpp

2
libi2pd/SSU2.cpp

@ -1288,6 +1288,7 @@ namespace transport
LogPrint(eLogWarning, "SSU2: Proxy UDP Associate socket error ", ecode.message()); LogPrint(eLogWarning, "SSU2: Proxy UDP Associate socket error ", ecode.message());
m_UDPAssociateSocket.reset (nullptr); m_UDPAssociateSocket.reset (nullptr);
m_ProxyRelayEndpoint.reset (nullptr); m_ProxyRelayEndpoint.reset (nullptr);
m_SocketV4.close ();
ConnectToProxy (); // try to reconnect immediately ConnectToProxy (); // try to reconnect immediately
} }
else else
@ -1310,6 +1311,7 @@ namespace transport
{ {
m_UDPAssociateSocket.reset (nullptr); m_UDPAssociateSocket.reset (nullptr);
m_ProxyRelayEndpoint.reset (nullptr); m_ProxyRelayEndpoint.reset (nullptr);
LogPrint(eLogInfo, "SSU2: Reconnecting to proxy");
ConnectToProxy (); ConnectToProxy ();
} }
}); });

Loading…
Cancel
Save