Skip to content

Commit

Permalink
close relay socket if associate socket gets closed
Browse files Browse the repository at this point in the history
  • Loading branch information
orignal committed Oct 28, 2022
1 parent 1738d11 commit 4ed4e87
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libi2pd/SSU2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1288,6 +1288,7 @@ namespace transport
LogPrint(eLogWarning, "SSU2: Proxy UDP Associate socket error ", ecode.message());
m_UDPAssociateSocket.reset (nullptr);
m_ProxyRelayEndpoint.reset (nullptr);
m_SocketV4.close ();
ConnectToProxy (); // try to reconnect immediately
}
else
Expand All @@ -1310,6 +1311,7 @@ namespace transport
{
m_UDPAssociateSocket.reset (nullptr);
m_ProxyRelayEndpoint.reset (nullptr);
LogPrint(eLogInfo, "SSU2: Reconnecting to proxy");
ConnectToProxy ();
}
});
Expand Down

0 comments on commit 4ed4e87

Please sign in to comment.