4849505152535455565758
synchronized (sessions) { Iterator<WebSocketSession> it = sessions.iterator(); while (it.hasNext()) { final WebSocketSession sess = it.next(); try { sess.sendText(payload); } catch (IOException e) { it.remove(); } } }
4647484950515253545556