-
Notifications
You must be signed in to change notification settings - Fork 22
Closed
Description
Should we be swallowing and optionally debug logging Connection reset by peer
socket exceptions?
Example exception:
java.net.SocketException: Connection reset by peer
at java.base/sun.nio.ch.SocketDispatcher.write0(Native Method)
at java.base/sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:62)
at java.base/sun.nio.ch.NioSocketImpl.tryWrite(NioSocketImpl.java:394)
at java.base/sun.nio.ch.NioSocketImpl.implWrite(NioSocketImpl.java:413)
at java.base/sun.nio.ch.NioSocketImpl.write(NioSocketImpl.java:440)
at java.base/sun.nio.ch.NioSocketImpl$2.write(NioSocketImpl.java:819)
at java.base/java.net.Socket$SocketOutputStream.write(Socket.java:1195)
at io.fusionauth.http.server.io.ThroughputOutputStream.write(ThroughputOutputStream.java:60)
at io.fusionauth.http.server.io.HTTPOutputStream$ServerToSocketOutputStream.forceFlush(HTTPOutputStream.java:298)
at io.fusionauth.http.server.io.HTTPOutputStream$ServerToSocketOutputStream.write(HTTPOutputStream.java:326)
at io.fusionauth.http.io.ChunkedOutputStream.flush(ChunkedOutputStream.java:68)
at io.fusionauth.http.io.ChunkedOutputStream.write(ChunkedOutputStream.java:91)
at io.fusionauth.http.server.io.HTTPOutputStream.write(HTTPOutputStream.java:148)
Generally speaking since we can't control the client, and they could choose to close a socket whenever they wish, I think this type of exception should be expected and just debug logged.
For example, Tomcat wraps these types of exceptions in ClientAbortException
And then catches that type and ignores it.
Metadata
Metadata
Assignees
Labels
No labels