增加edge-node ip.close IP命令

This commit is contained in:
GoEdgeLab
2022-12-12 19:23:58 +08:00
parent a0cfaa9fa6
commit 595a118cf2
4 changed files with 52 additions and 1 deletions

View File

@@ -102,6 +102,13 @@ func (this *Map) CloseIPConns(ip string) {
if ok {
for _, conn := range conns {
// 设置Linger
lingerConn, isLingerConn := conn.(LingerConn)
if isLingerConn {
_ = lingerConn.SetLinger(0)
}
// 关闭
_ = conn.Close()
}