Log stack trace on failure to send message to client

Issue: SPR-11201
This commit is contained in:
Rossen Stoyanchev
2014-01-03 15:32:48 -05:00
parent b9c8f47b01
commit d0556e61f9

View File

@@ -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);