https://issues.apache.org/bugzilla/show_bug.cgi?id=54942
Bug ID: 54942 Summary: a design question of websocket Product: Tomcat 7 Version: 7.0.39 Hardware: PC OS: Windows XP Status: NEW Severity: normal Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: gaochan...@126.com Classification: Unclassified hi,boys: there is a design question in the bound! for example: in my wesocketservlet, i write a loop in broadcast. eg. private void broadcast(String message) throws IOException{ String mmstr = ""; while(true) { for (ChatMessageInbound connection : connections) { String msg = "update:[" + mmstr +"] is over"; CharBuffer buffer = CharBuffer.wrap(msg); connection.getWsOutbound().writeTextMessage(buffer); } } } now,how did the servlet know it when the brower is closed? i hope you could add a boolean in the connection so that i can filter the connection,then change the condition of while (true).or just a empty while with a Thread.sleep(). -- 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