Skip to content

System.IO.IOException when connection is closed from client #35

Open
@heremit

Description

@heremit

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()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions