Issue #1650 - testcase stability effort (take 4 w/debug)

This commit is contained in:
Joakim Erdfelt 2017-07-05 10:07:33 -07:00
parent a89ee5b65d
commit a3427cc32d
2 changed files with 8 additions and 0 deletions

View File

@ -31,6 +31,7 @@ import org.eclipse.jetty.util.log.Logger;
import org.eclipse.jetty.websocket.api.Session;
import org.eclipse.jetty.websocket.api.WebSocketAdapter;
import org.eclipse.jetty.websocket.api.annotations.WebSocket;
import org.eclipse.jetty.websocket.common.util.TextUtil;
@WebSocket
public class CheckSocket extends WebSocketAdapter
@ -91,6 +92,11 @@ public class CheckSocket extends WebSocketAdapter
{
getRemote().sendString(msg);
}
else
{
LOG.warn("Not connected, cannot send {}", TextUtil.quote(msg));
LOG.debug("Session: {}", getSession());
}
}
public void close(int statusCode, String reason)

View File

@ -27,6 +27,7 @@ import javax.websocket.server.ServerEndpoint;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
import org.eclipse.jetty.websocket.common.util.TextUtil;
@ServerEndpoint("/echo")
public class EchoSocket
@ -52,6 +53,7 @@ public class EchoSocket
@OnMessage
public String onMessage(String msg)
{
LOG.debug("onMessage({})", TextUtil.quote(msg));
return msg;
}
}