Java WebSockets: The remote endpoint was in state [TEXT_FULL_WRITING]
问题 I am trying to implement some application based on websockets which will communicate with JS clients quite intensively. The code to send the message is quite primitive: synchronized (session) { if (session.isOpen()) { session.getBasicRemote().sendText(message); } } For rare sending it works just fine, but when few threads are trying to send some messages by the same session (socket), next exception is thrown (please note that it is not multithreading issue because code block is synchronized