You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2019/10/01 13:11:10 UTC
[wicket] branch wicket-8.x updated: WICKET-6706 Websocket Endpoint
logs exception when user leaves page
This is an automated email from the ASF dual-hosted git repository.
mgrigorov pushed a commit to branch wicket-8.x
in repository https://gitbox.apache.org/repos/asf/wicket.git
The following commit(s) were added to refs/heads/wicket-8.x by this push:
new c4e87bb WICKET-6706 Websocket Endpoint logs exception when user leaves page
c4e87bb is described below
commit c4e87bbb7d988e249860ae30cff248c92eb2afa7
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
AuthorDate: Tue Oct 1 16:10:20 2019 +0300
WICKET-6706 Websocket Endpoint logs exception when user leaves page
Log EOFException only when DEBUG logging is enabled
---
.../org/apache/wicket/protocol/ws/javax/WicketEndpoint.java | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/wicket-native-websocket/wicket-native-websocket-javax/src/main/java/org/apache/wicket/protocol/ws/javax/WicketEndpoint.java b/wicket-native-websocket/wicket-native-websocket-javax/src/main/java/org/apache/wicket/protocol/ws/javax/WicketEndpoint.java
index e93cf86..829fe90 100644
--- a/wicket-native-websocket/wicket-native-websocket-javax/src/main/java/org/apache/wicket/protocol/ws/javax/WicketEndpoint.java
+++ b/wicket-native-websocket/wicket-native-websocket-javax/src/main/java/org/apache/wicket/protocol/ws/javax/WicketEndpoint.java
@@ -16,6 +16,7 @@
*/
package org.apache.wicket.protocol.ws.javax;
+import java.io.EOFException;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -89,7 +90,15 @@ public class WicketEndpoint extends Endpoint
@Override
public void onError(Session session, Throwable t)
{
- LOG.error("An error occurred in web socket connection with id : " + session.getId(), t);
+ if (t instanceof EOFException)
+ {
+ LOG.debug("An error occurred in web socket connection with id : {}", session.getId(), t);
+ }
+ else
+ {
+ LOG.error("An error occurred in web socket connection with id : {}", session.getId(), t);
+ }
+
super.onError(session, t);
if (isApplicationAlive())