Browse Source

Instead of checking for timeouts check for Tempoary errors, which will allow 5 timeouts before returning false

Chris Bannister 11 years ago
parent
commit
eebae68aa6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      conn.go

+ 1 - 1
conn.go

@@ -215,7 +215,7 @@ func (c *Conn) recv() (frame, error) {
 		nn, err := c.r.Read(resp[n:])
 		nn, err := c.r.Read(resp[n:])
 		n += nn
 		n += nn
 		if err != nil {
 		if err != nil {
-			if nerr, ok := err.(net.Error); ok && nerr.Timeout() {
+			if nerr, ok := err.(net.Error); ok && nerr.Temporary() {
 				if n > last {
 				if n > last {
 					// we hit the deadline but we made progress.
 					// we hit the deadline but we made progress.
 					// simply extend the deadline
 					// simply extend the deadline