uHttpSharp icon indicating copy to clipboard operation
uHttpSharp copied to clipboard

System.IO.IOException when connection is closed from client

Open heremit opened this issue 4 years ago • 0 comments

If client does not wait and closes connection appears an exception:

2021-05-17 08:34:36 [WARN]  (uhttpsharp.HttpClientHandler) Error while serving : 127.0.0.1:63782
System.IO.IOException
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   at System.IO.BufferedStream.Read(Byte[] array, Int32 offset, Int32 count)
   at uhttpsharp.LimitedStream.Read(Byte[] buffer, Int32 offset, Int32 count) in c:\Users\shani\Documents\GitHub\uHttpSharp\uhttpsharp\LimitedStream.cs:line 129
   at uhttpsharp.NotFlushingStream.Read(Byte[] buffer, Int32 offset, Int32 count) in c:\Users\shani\Documents\GitHub\uHttpSharp\uhttpsharp\HttpClient.cs:line 211
   at System.IO.Stream.<>c.<BeginReadInternal>b__39_0(Object <p0>)
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()

heremit avatar May 17 '21 17:05 heremit