webSocket
This commit is contained in:
+8
-6
@@ -89,11 +89,13 @@ public class WebSocket {
|
|||||||
public void pushMessage(String message) {
|
public void pushMessage(String message) {
|
||||||
try {
|
try {
|
||||||
for (WebSocket ws : webSockets) {
|
for (WebSocket ws : webSockets) {
|
||||||
try {
|
synchronized (ws.session){
|
||||||
ws.session.getBasicRemote().sendText(message);
|
try {
|
||||||
} catch (IOException e) {
|
ws.session.getBasicRemote().sendText(message);
|
||||||
e.printStackTrace();
|
} catch (IOException e) {
|
||||||
continue;
|
e.printStackTrace();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -152,4 +154,4 @@ public class WebSocket {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user