Close on version mismatch

This commit is contained in:
Jakob Borg
2013-12-21 08:06:54 +01:00
parent f5987fba32
commit 8d3aa97047
2 changed files with 26 additions and 0 deletions

View File

@@ -192,6 +192,10 @@ func (c *Connection) readerLoop() {
c.close()
break
}
if hdr.version != 0 {
c.close()
break
}
c.wLock.Lock()
c.lastReceive = time.Now()