Commit 44f989a8eb4bc22360a417656d9bcfbc59c0b0c1
Merge branch '20230426' into 'master_dev'
fix: 鉴权随机失败问题修复 See merge request yunteng/thingskit!185
Showing
1 changed file
with
1 additions
and
2 deletions
... | ... | @@ -450,7 +450,6 @@ public class TcpTransportHandler extends ChannelInboundHandlerAdapter implements |
450 | 450 | transportService.process(deviceSessionCtx.getSessionInfo(), SESSION_EVENT_MSG_OPEN, new TransportServiceCallback<Void>() { |
451 | 451 | @Override |
452 | 452 | public void onSuccess(Void msg) { |
453 | - authedCounter.incrementAndGet(); | |
454 | 453 | SessionMetaData sessionMetaData = transportService.registerAsyncSession(deviceSessionCtx.getSessionInfo(), TcpTransportHandler.this); |
455 | 454 | checkGatewaySession(sessionMetaData); |
456 | 455 | ctx.writeAndFlush(createTcpConnAckMsg(authEntry.getSuccess())); |
... | ... | @@ -476,7 +475,7 @@ public class TcpTransportHandler extends ChannelInboundHandlerAdapter implements |
476 | 475 | |
477 | 476 | private void onValidateFailed(ChannelHandlerContext ctx, MqttConnectReturnCode msg) { |
478 | 477 | authedCounter.incrementAndGet(); |
479 | - if (TkScriptInvokeService.authScripts.size() == authedCounter.incrementAndGet()) { | |
478 | + if (TkScriptInvokeService.authScripts.size() == authedCounter.intValue()) { | |
480 | 479 | ctx.writeAndFlush(createTcpConnAckMsg(msg.name())); |
481 | 480 | ctx.close(); |
482 | 481 | } | ... | ... |