Skip to content

Commit

Permalink
avoid one unhandled exception when listener socket quit without inten…
Browse files Browse the repository at this point in the history
…ded closure
  • Loading branch information
kerryjiang committed Dec 27, 2024
1 parent 31579a1 commit 5ca703e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SuperSocket.Server/Connection/TcpConnectionListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private async Task KeepAccept(Socket listenSocket)
}
}

_stopTaskCompletionSource.TrySetResult(true);
_stopTaskCompletionSource?.TrySetResult(true);
}

public event NewConnectionAcceptHandler NewConnectionAccept;
Expand Down

0 comments on commit 5ca703e

Please sign in to comment.