Skip to content

Commit 2117b15

Browse files
vaadin-botArtur-
andauthored
fix: log "Connection remotely closed" IOException at debug level (#22102) (#22115)
Changes the log level from ERROR to DEBUG for the specific IOException that occurs when a client connection dies during push communication. This reduces noise in logs, especially during integration tests. Fixes #21782 Co-authored-by: Artur <artur@vaadin.com>
1 parent 025939b commit 2117b15

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

flow-server/src/main/java/com/vaadin/flow/server/communication/PushAtmosphereHandler.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,14 @@ public void onDisconnect(AtmosphereResourceEvent event) {
115115

116116
@Override
117117
public void onThrowable(AtmosphereResourceEvent event) {
118-
getLogger().error("Exception in push connection",
119-
event.throwable());
118+
Throwable throwable = event.throwable();
119+
if (throwable instanceof IOException
120+
&& throwable.getMessage() != null && throwable.getMessage()
121+
.contains("Connection remotely closed")) {
122+
getLogger().debug("Push connection remotely closed", throwable);
123+
} else {
124+
getLogger().error("Exception in push connection", throwable);
125+
}
120126
pushHandler.connectionLost(event);
121127
}
122128
}

0 commit comments

Comments
 (0)