Joyit 1 week ago
parent
commit
4c1f7d71c7
2 changed files with 2 additions and 2 deletions
  1. 1 1
      conn/tcp2/tcp2.go
  2. 1 1
      conn/ws2/ws2.go

+ 1 - 1
conn/tcp2/tcp2.go

@@ -321,7 +321,7 @@ func (c *Tcp2) ReadAuthInfo() (proto string, version uint8, channel string, auth
 		return
 	}
 	if proto != PROTO {
-		err = fmt.Errorf("wrong proto: %s", proto)
+		err = fmt.Errorf("wrong proto: want %s, get %s", PROTO, proto)
 		return
 	}
 	if version != VERSION {

+ 1 - 1
conn/ws2/ws2.go

@@ -255,7 +255,7 @@ func (c *Ws2) ReadAuthInfo() (proto string, version uint8, channel string, auth
 		return
 	}
 	if proto != PROTO && proto != PROTO_STL {
-		err = fmt.Errorf("wrong proto: %s", proto)
+		err = fmt.Errorf("wrong proto: want %s, get %s", PROTO, proto)
 		return
 	}
 	if version != VERSION {