From 9e7c676c449dfae8ae0654d61236905cb44d9ddf Mon Sep 17 00:00:00 2001 From: skiffer-git <44203734@qq.com> Date: Mon, 13 May 2024 11:10:42 +0800 Subject: [PATCH] Add etcd as a service discovery mechanism --- internal/msggateway/n_ws_server.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/internal/msggateway/n_ws_server.go b/internal/msggateway/n_ws_server.go index a29b58528..29cbb51d8 100644 --- a/internal/msggateway/n_ws_server.go +++ b/internal/msggateway/n_ws_server.go @@ -212,11 +212,8 @@ func (ws *WsServer) sendUserOnlineInfoToOtherNode(ctx context.Context, client *C // Online push user online message to other node for _, v := range conns { log.ZDebug(ctx, " sendUserOnlineInfoToOtherNode conn ", "target", v.Target()) - //if v.Target() == ws.disCov.GetSelfConnTarget() { - // log.ZDebug(ctx, "Filter out this node", "node", v.Target()) - // continue - //} - if true { + if v.Target() == ws.disCov.GetSelfConnTarget() { + log.ZDebug(ctx, "Filter out this node", "node", v.Target()) continue }