WebSocket中的报错:Exception in thread "Thread-5" java.lang.IllegalStateException: The remote endpoint wa

Exception in thread "Thread-5" java.lang.IllegalStateException: The remote endpoint was in state [TEXT_FULL_WRITING] which is an invalid state for called method
    at org.apache.tomcat.websocket.WsRemoteEndpointImplBase$StateMachine.checkState(WsRemoteEndpointImplBase.java:1225)
    at org.apache.tomcat.websocket.WsRemoteEndpointImplBase$StateMachine.textStart(WsRemoteEndpointImplBase.java:1187)
    at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendString(WsRemoteEndpointImplBase.java:190)
    at org.apache.tomcat.websocket.WsRemoteEndpointBasic.sendText(WsRemoteEndpointBasic.java:37)
    at www.cfyg.com.controller.SendThread$1.run(SendThread.java:30)
            throw new IllegalStateException(WsRemoteEndpointImplBase.sm.getString("wsRemoteEndpoint.wrongState", new Object[]{this.state}));


原因:多次调用同一个session,导致的错。

猜你喜欢

转载自blog.csdn.net/qq_40615403/article/details/86559180