This commit is contained in:
Redkale
2019-01-18 22:25:20 +08:00
parent bcaf7ab73e
commit fea34863e3

View File

@@ -127,7 +127,7 @@ public class WebSocketEngine {
} }
@Comment("添加WebSocket") @Comment("添加WebSocket")
void addLocal(WebSocket socket) { CompletableFuture<Void> addLocal(WebSocket socket) {
if (single) { if (single) {
currconns.incrementAndGet(); currconns.incrementAndGet();
websockets.put(socket._userid, socket); websockets.put(socket._userid, socket);
@@ -140,7 +140,8 @@ public class WebSocketEngine {
currconns.incrementAndGet(); currconns.incrementAndGet();
list.add(socket); list.add(socket);
} }
if (node != null) node.connect(socket._userid); if (node != null) return node.connect(socket._userid);
return null;
} }
@Comment("从WebSocketEngine删除指定WebSocket") @Comment("从WebSocketEngine删除指定WebSocket")