Browse Source

fix reading from the bufio.Reader

Chris Bannister 10 years ago
parent
commit
90c0bfb5f5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      conn.go

+ 1 - 1
conn.go

@@ -306,7 +306,7 @@ func (c *Conn) recv() (frame, error) {
 	for i := 0; i < maxAttempts; i++ {
 		var nn int
 		c.conn.SetReadDeadline(time.Now().Add(c.timeout))
-		nn, err = c.Read(resp[n : size+bodySize])
+		nn, err = io.ReadFull(c.r, resp[n:size+bodySize])
 		if err == nil {
 			break
 		}