Skip to content

Commit

Permalink
Broker 优化鉴权与注册顺序
Browse files Browse the repository at this point in the history
  • Loading branch information
noear committed Dec 5, 2023
1 parent 480abba commit d02bf64
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ public BrokerListenerFolkmq addAccessAll(Map<String, String> accessMap) {

@Override
public void onOpen(Session session) throws IOException {
super.onOpen(session);

if (serverAccessMap.size() > 0) {
//如果有 ak/sk 配置,则进行鉴权
String accessKey = session.param(MqConstants.PARAM_ACCESS_KEY);
Expand All @@ -63,6 +61,8 @@ public void onOpen(Session session) throws IOException {
}
}

super.onOpen(session);

log.info("Server channel opened, sessionId={}", session.sessionId());
}

Expand Down

0 comments on commit d02bf64

Please sign in to comment.