@ -296,8 +296,10 @@ public class StompSubProtocolHandler implements SubProtocolHandler, ApplicationE
@@ -296,8 +296,10 @@ public class StompSubProtocolHandler implements SubProtocolHandler, ApplicationE
}
}
catch(Throwableex){
logger.error("Failed to send client message to application via MessageChannel"+
" in session "+session.getId()+". Sending STOMP ERROR to client.",ex);
if(logger.isErrorEnabled()){
logger.error("Failed to send client message to application via MessageChannel"+
" in session "+session.getId()+". Sending STOMP ERROR to client.",ex);
}
handleError(session,ex,message);
}
}
@ -316,7 +318,7 @@ public class StompSubProtocolHandler implements SubProtocolHandler, ApplicationE
@@ -316,7 +318,7 @@ public class StompSubProtocolHandler implements SubProtocolHandler, ApplicationE
@ -365,7 +367,9 @@ public class StompSubProtocolHandler implements SubProtocolHandler, ApplicationE
@@ -365,7 +367,9 @@ public class StompSubProtocolHandler implements SubProtocolHandler, ApplicationE
this.eventPublisher.publishEvent(event);
}
catch(Throwableex){
logger.error("Error publishing "+event,ex);
if(logger.isErrorEnabled()){
logger.error("Error publishing "+event,ex);
}
}
}
@ -376,27 +380,29 @@ public class StompSubProtocolHandler implements SubProtocolHandler, ApplicationE
@@ -376,27 +380,29 @@ public class StompSubProtocolHandler implements SubProtocolHandler, ApplicationE
@ -411,25 +417,21 @@ public class StompSubProtocolHandler implements SubProtocolHandler, ApplicationE
@@ -411,25 +417,21 @@ public class StompSubProtocolHandler implements SubProtocolHandler, ApplicationE
@ -443,7 +445,9 @@ public class StompSubProtocolHandler implements SubProtocolHandler, ApplicationE
@@ -443,7 +445,9 @@ public class StompSubProtocolHandler implements SubProtocolHandler, ApplicationE
}
catch(Throwableex){
// Could be part of normal workflow (e.g. browser tab closed)
logger.debug("Failed to send WebSocket message to client in session "+session.getId(),ex);
if(logger.isDebugEnabled()){
logger.debug("Failed to send WebSocket message to client in session "+session.getId(),ex);
}
command=StompCommand.ERROR;
}
finally{
@ -500,9 +504,13 @@ public class StompSubProtocolHandler implements SubProtocolHandler, ApplicationE
@@ -500,9 +504,13 @@ public class StompSubProtocolHandler implements SubProtocolHandler, ApplicationE
@ -513,6 +521,7 @@ public class StompSubProtocolHandler implements SubProtocolHandler, ApplicationE
@@ -513,6 +521,7 @@ public class StompSubProtocolHandler implements SubProtocolHandler, ApplicationE
elseif(!acceptVersions.isEmpty()){
thrownewIllegalArgumentException("Unsupported STOMP version '"+acceptVersions+"'");
@ -520,6 +529,7 @@ public class StompSubProtocolHandler implements SubProtocolHandler, ApplicationE
@@ -520,6 +529,7 @@ public class StompSubProtocolHandler implements SubProtocolHandler, ApplicationE