Explorar o código

retrieve the root cause of the error

Darien Raymond %!s(int64=8) %!d(string=hai) anos
pai
achega
c4be61e854
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      proxy/http/server.go

+ 1 - 1
proxy/http/server.go

@@ -65,7 +65,7 @@ func parseHost(rawHost string, defaultPort net.Port) (net.Destination, error) {
 }
 
 func isTimeout(err error) bool {
-	nerr, ok := err.(net.Error)
+	nerr, ok := errors.Cause(err).(net.Error)
 	return ok && nerr.Timeout()
 }