Log stack trace on failure to send message to client

Issue: SPR-11201
master
Rossen Stoyanchev 11 years ago
parent b9c8f47b01
commit d0556e61f9
  1. 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 {
writeFrameInternal(frame); writeFrameInternal(frame);
} }
catch (Throwable ex) { catch (Throwable ex) {
if (ex instanceof EOFException || ex instanceof SocketException) { logger.error("Terminating connection after failure to send message to client. " +
logger.warn("Client went away. Terminating connection"); "This may be because the client has gone away " +
} "(see https://java.net/jira/browse/SERVLET_SPEC-44)", ex);
else {
logger.warn("Terminating connection after failure to send message: " + ex.getMessage());
}
try { try {
disconnect(CloseStatus.SERVER_ERROR); disconnect(CloseStatus.SERVER_ERROR);
close(CloseStatus.SERVER_ERROR); close(CloseStatus.SERVER_ERROR);

Loading…
Cancel
Save