update异常后删除连接

This commit is contained in:
2023-11-06 13:20:07 +08:00
parent 65dbee64a1
commit df8f916c88
2 changed files with 20 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
package com.jsowell.common.enums.ykc;
import com.jsowell.common.util.StringUtils;
import io.netty.channel.Channel;
import lombok.extern.slf4j.Slf4j;
@@ -61,4 +62,11 @@ public class PileChannelEntity {
manager.remove(pileSn);
}
public static void removeByChannelId(String channelId){
String pileSn = getPileSnByChannelId(channelId);
if (StringUtils.isNotBlank(pileSn)) {
manager.remove(pileSn);
}
}
}