The GitHub Actions job "Scalafmt" on pekko-http.git/websocket-idle-timeouts has failed. Run started by GitHub user pjfanning (triggered by pjfanning).
Head commit for run: eb32c761e49b4359f83cdeb40d02631f1ba3da24 / PJ Fanning <[email protected]> add WebSocket receive-idle-timeout and send-idle-timeout settings Motivation: A WebSocket connection whose network path is lost (e.g. a peer that disappears without closing the TCP connection) can go unnoticed for a long time. Periodic keep-alive Pings alone do not fail the connection when no Pong comes back. Modification: - Add pekko.http.{server,client}.websocket.receive-idle-timeout and send-idle-timeout (default infinite = disabled), with getters and withX setters (Scala and java.time Duration) on WebSocketSettings. - Add an idle-timeout layer to the WebSocket stack directly above masking, so all frames, including Ping/Pong control frames, count as activity. FrameHandler drops Pong frames, so a layer above frame handling would time out a healthy connection whose only traffic is keep-alive Ping/Pong. - Fail with a new WebSocketIdleTimeoutException (a RuntimeException). Pekko's client TCP connection rewrites any TimeoutException passing through it (including StreamIdleTimeoutException) into a TcpIdleTimeoutException naming the TCP idle-timeout, which would misreport a WebSocket send idle timeout. - Document the settings in reference.conf and the server and client WebSocket docs; add MiMa filters for the new methods on the @DoNotInherit WebSocketSettings. Result: Users can detect lost WebSocket connections, e.g. by combining receive-idle-timeout with periodic-keep-alive-max-idle in ping mode. Tests: - sbt "http-core/Test/testOnly ...ws.WebSocketIdleTimeoutSpec ...ws.WebSocketIntegrationSpec": 12 passed (Scala 2.13); WebSocketIdleTimeoutSpec 6 passed on Scala 3.3.8 - With the idle layer placed above frame handling (as in akka-http), the keep-alive test fails (directional) - sbt http-core/mimaReportBinaryIssues: pass (with new excludes file) - sbt docs/paradox: pass - scalafmt --mode diff-ref=upstream/main: no changes References: Refs akka/akka-http#4289 (Apache 2.0 since the Akka HTTP 10.6.0 change date, 2026-10-23) Report URL: https://github.com/apache/pekko-http/actions/runs/39922636954 With regards, GitHub Actions via GitBox --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
