Skip to content

Commit

Permalink
watcher connectid four tuple
Browse files Browse the repository at this point in the history
  • Loading branch information
dzdx committed Aug 23, 2020
1 parent 3edbbcc commit c3b4e09
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/
package com.alipay.sofa.registry.server.session.scheduler.task;

import com.alipay.sofa.registry.common.model.constants.ValueConstants;
import com.alipay.sofa.registry.common.model.metaserver.DataOperator;
import com.alipay.sofa.registry.common.model.metaserver.NotifyProvideDataChange;
import com.alipay.sofa.registry.common.model.metaserver.ProvideData;
Expand Down Expand Up @@ -126,7 +127,7 @@ public void execute() {
for (Channel channel : sessionServer.getChannels()) {

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

0 comments on commit c3b4e09

Please sign in to comment.