-
Bug
-
Resolution: Done
-
Major
-
7.1.0.DR7
-
None
When running autobahn testsuite against echoing websocket endpoint which uses BasicRemote [1], test waits for timeout as it doesn't receive expected response in time.
I am able to reproduce it steadily (almost always) when running these two cases "12.5.7" and "12.5.8", which results in 12.5.8 to fail (when running it alone, it passes).
Attaching the autobahn spec file and websocket application containing the endpoint.
To reproduce don't forget, there is needed to enable the websocket compression => /subsystem=undertow/servlet-container=default/setting=websockets:write-attribute(name=per-message-deflate, value=true)
[1]
package test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.IOException; import java.io.OutputStream; import java.io.Writer; import javax.websocket.OnError; import javax.websocket.OnMessage; import javax.websocket.Session; import javax.websocket.server.ServerEndpoint; @ServerEndpoint(EchoBasicEndpoint.URL_PATTERN) public class EchoBasicEndpoint { public static final String URL_PATTERN = "/echoBasicEndpoint"; private static final Logger log = LoggerFactory.getLogger(EchoBasicEndpoint.class); Writer writer; OutputStream stream; @OnMessage public void handleStringMessage(final String message, Session session, boolean last) throws IOException { if (writer == null) { writer = session.getBasicRemote().getSendWriter(); } writer.write(message); if (last) { writer.close(); writer = null; } } @OnMessage public void handleByteMessage(final byte[] message, Session session, boolean last) throws IOException { if (stream == null) { stream = session.getBasicRemote().getSendStream(); } stream.write(message); stream.flush(); if (last) { stream.close(); stream = null; } } @OnError public void onError(Throwable t) { log.warn("WebSockets error message detected", t); } }
- is cloned by
-
UNDERTOW-894 Undertow fails to respond for big compressed websocket messages
- Resolved
- is incorporated by
-
JBEAP-7028 (7.1.0) Upgrade to WildFly Core 3.0.0.Alpha13
- Closed