Skip to content

Commit 2effdb2

Browse files
committed
Dispose the task
1 parent 80753ea commit 2effdb2

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/FubarDev.FtpServer/FtpConnection.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -927,7 +927,13 @@ protected override async Task<int> ReadFromStreamAsync(byte[] buffer, int offset
927927
return 0;
928928
}
929929

930-
return readTask.Result;
930+
#if NETSTANDARD1_3
931+
return await readTask.ConfigureAwait(false);
932+
#else
933+
var result = readTask.Result;
934+
readTask.Dispose();
935+
return result;
936+
#endif
931937
}
932938

933939
/// <inheritdoc />

0 commit comments

Comments
 (0)