Do not log an exception on connection closed by client (infamous Broken pipe error) - into 4.0.x branch#5583
Conversation
Similar logic to ResourceHandlerImpl, which doesn't log an exception on connection closed. Exception is not logged because it's caused by the client, there's no way to recover and the warning message only pollutes logs. Now also supports "connection closed" exception thrown by Grizzly.
|
Hi @arjantijms , @BalusC , could you rerun the job https://github.com/eclipse-ee4j/mojarra/actions/runs/14871103597/job/41759489356 - it seems it's a flaky test as I only disabled logging a warning if client aborted the connection, no impact on main functionality. |
|
I'm wondering if the new check can be more specific than that. What's the actual exception class? Is it indeed IOException or is it actually something Grizzly specific such as org.glassfish.ConnectionClosedException? If so then please check exception class instead like as already implemented for Tomcat and Jetty. What's the full exception message? Is it still "Connection is closed"? If so then please use equals instead of contains. The flaky test has been fixed. Thanks for pointing out that! Please downmerge in order to re-run tests on your PR. |
Similar logic to ResourceHandlerImpl, which doesn't log an exception on connection closed. Exception is not logged because it's caused by the client, there's no way to recover and the warning message only pollutes logs. Now the code treats "connection closed" exception thrown by Grizzly.