Browse Source

Log stack trace on failure to send message to client

Issue: SPR-11201
pull/432/head
Rossen Stoyanchev 11 years ago
parent
commit
d0556e61f9
  1. 9
      spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/session/AbstractSockJsSession.java

9
spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/session/AbstractSockJsSession.java

@ -275,12 +275,9 @@ public abstract class AbstractSockJsSession implements SockJsSession { @@ -275,12 +275,9 @@ public abstract class AbstractSockJsSession implements SockJsSession {
writeFrameInternal(frame);
}
catch (Throwable ex) {
if (ex instanceof EOFException || ex instanceof SocketException) {
logger.warn("Client went away. Terminating connection");
}
else {
logger.warn("Terminating connection after failure to send message: " + ex.getMessage());
}
logger.error("Terminating connection after failure to send message to client. " +
"This may be because the client has gone away " +
"(see https://java.net/jira/browse/SERVLET_SPEC-44)", ex);
try {
disconnect(CloseStatus.SERVER_ERROR);
close(CloseStatus.SERVER_ERROR);

Loading…
Cancel
Save