浏览代码

retrieve the root cause of the error

Darien Raymond 8 年之前
父节点
当前提交
c4be61e854
共有 1 个文件被更改,包括 1 次插入1 次删除
  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()
 }