diff --git a/prototils.go b/prototils.go index 4cbe45d..b0815aa 100644 --- a/prototils.go +++ b/prototils.go @@ -81,7 +81,7 @@ type WSProxyPackHead_S struct { } func (this *WspCliConn) IsValid() bool { - return this.Conn == nil || this.SocketHandle == 0 + return this.Conn != nil && this.SocketHandle != 0 } func (this *WspCliConn) Reset() {