Permalink
Browse files

Read a full init packet before panic

  • Loading branch information...
1 parent b05d3df commit 443635ff52bab3742b4bb8678931e080c240d401 @ziutek committed Aug 9, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 native/init.go
View
6 native/init.go
@@ -23,16 +23,16 @@ func (my *Conn) init() {
read(pr, 13)
if my.info.caps&_CLIENT_PROTOCOL_41 != 0 {
readFull(pr, my.info.scramble[8:])
- } else {
- panic(OLD_PROTOCOL_ERROR)
}
pr.readAll() // Skip other information
-
if my.Debug {
log.Printf(tab8s+"ProtVer=%d, ServVer=\"%s\" Status=0x%x",
my.info.prot_ver, my.info.serv_ver, my.status,
)
}
+ if my.info.caps&_CLIENT_PROTOCOL_41 == 0 {
+ panic(OLD_PROTOCOL_ERROR)
+ }
}
func (my *Conn) auth() {

0 comments on commit 443635f

Please sign in to comment.