Skip to content

Commit 1ceb094

Browse files
authored
Fix throwing an exception of _pipeTask=null when the client disconnects without calling the RunAsync method (kerryjiang#725)
1 parent 83378d1 commit 1ceb094

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/SuperSocket.Connection/PipeConnectionBase.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ private async ValueTask HandleClosing()
9797
{
9898
try
9999
{
100-
await _pipeTask.ConfigureAwait(false);
100+
if (_pipeTask != null)
101+
await _pipeTask.ConfigureAwait(false);
101102
}
102103
catch (OperationCanceledException)
103104
{

0 commit comments

Comments
 (0)