mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
Move broadcastToWatcher
This commit is contained in:
parent
8413e9b8f4
commit
26cf53f746
1 changed files with 2 additions and 2 deletions
|
|
@ -409,12 +409,12 @@ public class NotebookServer extends WebSocketServlet implements
|
|||
|
||||
private void broadcast(String noteId, Message m) {
|
||||
synchronized (noteSocketMap) {
|
||||
broadcastToWatchers(noteId, StringUtils.EMPTY, m);
|
||||
List<NotebookSocket> socketLists = noteSocketMap.get(noteId);
|
||||
if (socketLists == null || socketLists.size() == 0) {
|
||||
return;
|
||||
}
|
||||
LOG.debug("SEND >> " + m.op);
|
||||
broadcastToWatchers(noteId, StringUtils.EMPTY, m);
|
||||
for (NotebookSocket conn : socketLists) {
|
||||
try {
|
||||
conn.send(serializeMessage(m));
|
||||
|
|
@ -427,12 +427,12 @@ public class NotebookServer extends WebSocketServlet implements
|
|||
|
||||
private void broadcastExcept(String noteId, Message m, NotebookSocket exclude) {
|
||||
synchronized (noteSocketMap) {
|
||||
broadcastToWatchers(noteId, StringUtils.EMPTY, m);
|
||||
List<NotebookSocket> socketLists = noteSocketMap.get(noteId);
|
||||
if (socketLists == null || socketLists.size() == 0) {
|
||||
return;
|
||||
}
|
||||
LOG.debug("SEND >> " + m.op);
|
||||
broadcastToWatchers(noteId, StringUtils.EMPTY, m);
|
||||
for (NotebookSocket conn : socketLists) {
|
||||
if (exclude.equals(conn)) {
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Reference in a new issue