Files
EdgeNode/internal/nodes/client_conn_utils.go

21 lines
329 B
Go
Raw Normal View History

2024-05-17 18:30:33 +08:00
// Copyright 2021 GoEdge goedge.cdn@gmail.com. All rights reserved.
2021-10-25 19:00:42 +08:00
package nodes
import (
"net"
)
// 判断客户端连接是否已关闭
func isClientConnClosed(conn net.Conn) bool {
if conn == nil {
return true
}
2021-12-12 11:48:01 +08:00
clientConn, ok := conn.(ClientConnInterface)
2021-10-25 19:00:42 +08:00
if ok {
return clientConn.IsClosed()
}
return true
2021-10-25 19:00:42 +08:00
}