https://bz.apache.org/bugzilla/show_bug.cgi?id=57894

            Bug ID: 57894
           Summary: IllegalStateException - BINARY_FULL_WRITING
           Product: Tomcat 8
           Version: 8.0.21
          Hardware: All
                OS: All
            Status: NEW
          Severity: critical
          Priority: P2
         Component: WebSocket
          Assignee: dev@tomcat.apache.org
          Reporter: yaowei...@gmail.com

WsRemoteEndpointImplBase.sendBinary is not synchronized. And there's no way to
detect the state outside.

client -> server -> client -> server

The second time client call sendBinary may fail due to the race condition of
stateMachine.binaryStart and stateMachine.complete

java.lang.IllegalStateException: The remote endpoint was in state
[BINARY_FULL_WRITING] which is an invalid state for called method
    at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase$StateMachine.checkState(WsRemoteEndpointImplBase.java:1148)
    at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase$StateMachine.binaryStart(WsRemoteEndpointImplBase.java:1101)
    at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendBytes(WsRemoteEndpointImplBase.java:131)
    at
org.apache.tomcat.websocket.WsRemoteEndpointBasic.sendBinary(WsRemoteEndpointBasic.java:43)

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to