Skip to content

fix: Ignore remote peer closed on write (ConnectionReset) #166

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Kissaki
Copy link
Contributor

@Kissaki Kissaki commented Apr 29, 2025

During writing to a connection stream a socket exception (SocketException) may be thrown.

The socket error SocketError.ConnectionReset (10054 WSAECONNRESET) indicates that the remote peer closed the connection.

This lead to unhandled exceptions being thrown and logged.

Given that this is a client initiated abort, there is no issue on the server side. A debug log level log message is appropriate for that, instead of warning or throwing (unhandled) exceptions.


This is reproducible with mass-connects.
In my test scenario I create (sequentially) 20 times (concurrently) 400 TCP connect Tasks.

During writing to a connection stream a socket exception (SocketException) may be thrown.

The socket error SocketError.ConnectionReset (10054 WSAECONNRESET) indicates that the remote peer closed the connection.

This lead to unhandled exceptions being thrown and logged.

Given that this is a client initiated abort, there is no issue on the server side.
A debug log level log message is appropriate for that, instead of warning or throwing (unhandled) exceptions.

---

This is reproducible with mass-connects.
In my test scenario I create (sequentially) 20 times (concurrently) 400 TCP connect Tasks.

Co-authored-by: Jan Klass <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant