Browse Source

Merge pull request #138 from Zariel/use-tempory-not-timeout

Instead of checking for timeouts check for Tempoary errors, which will a...
Ben Hood 11 years ago
parent
commit
7e49292f5c
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:])
 		n += nn
 		if err != nil {
-			if nerr, ok := err.(net.Error); ok && nerr.Timeout() {
+			if nerr, ok := err.(net.Error); ok && nerr.Temporary() {
 				if n > last {
 					// we hit the deadline but we made progress.
 					// simply extend the deadline