Skip to content

Commit

Permalink
close all existing streams when command SAM socket got closed
Browse files Browse the repository at this point in the history
  • Loading branch information
orignal committed Aug 11, 2021
1 parent 49b3ac7 commit 38a2d45
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libi2pd_client/SAM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1207,7 +1207,11 @@ namespace client
void SAMSingleSession::StopLocalDestination ()
{
localDestination->Release ();
// stop accepting new streams
localDestination->StopAcceptingStreams ();
// terminate existing streams
auto s = localDestination->GetStreamingDestination (); // TODO: take care about datagrams
if (s) s->Stop ();
}

void SAMMasterSession::Close ()
Expand Down

0 comments on commit 38a2d45

Please sign in to comment.