mirror of
https://github.com/zongzibinbin/MallChat.git
synced 2025-12-26 04:47:53 +08:00
Merge pull request #94 from lm0303/main
将废弃的ServerHandshakeStateEvent.HANDSHAKE_COMPLETE升级为HandshakeComplete
This commit is contained in:
commit
161e2de4dc
@ -67,7 +67,7 @@ public class JwtUtils {
|
||||
DecodedJWT jwt = verifier.verify(token);
|
||||
return jwt.getClaims();
|
||||
} catch (Exception e) {
|
||||
log.info("decode error,token:{}", token, e);
|
||||
log.error("decode error,token:{}", token, e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -38,4 +38,5 @@ public interface LoginService {
|
||||
* @return
|
||||
*/
|
||||
Long getValidUid(String token);
|
||||
|
||||
}
|
||||
|
||||
@ -67,7 +67,7 @@ public class NettyWebSocketServerHandler extends SimpleChannelInboundHandler<Tex
|
||||
// 关闭用户的连接
|
||||
userOffLine(ctx);
|
||||
}
|
||||
} else if (evt == WebSocketServerProtocolHandler.ServerHandshakeStateEvent.HANDSHAKE_COMPLETE) {
|
||||
} else if (evt instanceof WebSocketServerProtocolHandler.HandshakeComplete) {
|
||||
this.webSocketService.connect(ctx.channel());
|
||||
String token = NettyUtil.getAttr(ctx.channel(), NettyUtil.TOKEN);
|
||||
if (StrUtil.isNotBlank(token)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user