Skip to content

Commit

Permalink
Destination: delete tunnel pool outside of dtor
Browse files Browse the repository at this point in the history
Fixes one of the segfaults upon SIGINT

References monero-project#342
  • Loading branch information
anonimal committed Sep 13, 2016
1 parent 81e7f17 commit fe270c0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/client/destination.cc
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,6 @@ ClientDestination::~ClientDestination() {
Stop();
for (auto it : m_LeaseSetRequests)
delete it.second;
if (m_Pool)
i2p::tunnel::tunnels.DeleteTunnelPool(m_Pool);
if (m_DatagramDestination)
delete m_DatagramDestination;
}
Expand Down Expand Up @@ -204,6 +202,7 @@ void ClientDestination::Stop() {
if (m_Pool) {
m_Pool->SetLocalDestination(nullptr);
i2p::tunnel::tunnels.StopTunnelPool(m_Pool);
i2p::tunnel::tunnels.DeleteTunnelPool(m_Pool);
}
m_Service.stop();
if (m_Thread) {
Expand Down

0 comments on commit fe270c0

Please sign in to comment.