Skip to content

Commit b9c829c

Browse files
committed
watcher connectid four tuple
1 parent 1a8eefd commit b9c829c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/server/session/src/main/java/com/alipay/sofa/registry/server/session/scheduler/task/ProvideDataChangeFetchTask.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
*/
1717
package com.alipay.sofa.registry.server.session.scheduler.task;
1818

19+
import com.alipay.sofa.registry.common.model.constants.ValueConstants;
1920
import com.alipay.sofa.registry.common.model.metaserver.DataOperator;
2021
import com.alipay.sofa.registry.common.model.metaserver.NotifyProvideDataChange;
2122
import com.alipay.sofa.registry.common.model.metaserver.ProvideData;
@@ -126,7 +127,7 @@ public void execute() {
126127
for (Channel channel : sessionServer.getChannels()) {
127128

128129
//filter all connect client has watcher registerId
129-
String connectId = NetUtil.toAddressString(channel.getRemoteAddress());
130+
String connectId = NetUtil.toAddressString(channel.getRemoteAddress()) + ValueConstants.CONNECT_ID_SPLIT + NetUtil.toAddressString(channel.getLocalAddress());
130131
Map<String, Watcher> map = getCache(connectId);
131132
List<String> registerIds = new ArrayList<>();
132133
map.forEach((registerId, watchers) -> {

0 commit comments

Comments
 (0)