Merge pull request #481 from ywk253100/retry

Retry the job which failed because the network error
This commit is contained in:
Wenkai Yin 2016-07-06 14:02:33 +08:00 committed by GitHub
commit c6cc4e0c22

View File

@ -23,7 +23,7 @@ func retry(err error) bool {
if err == nil {
return false
}
return isTemporary(err)
return isNetworkErr(err)
}
func isTemporary(err error) bool {
@ -32,3 +32,8 @@ func isTemporary(err error) bool {
}
return false
}
func isNetworkErr(err error) bool {
_, ok := err.(net.Error)
return ok
}