mirror of
https://github.com/pgsty/minio.git
synced 2026-07-19 12:10:24 +03:00
Webhook endpoints can fail, we must start the server. (#4255)
This PR fixes a regression introduced in #4060
This commit is contained in:
committed by
Dee Koder
parent
a02575ebf9
commit
df027a8f51
@@ -69,10 +69,15 @@ func isNetErrorIgnored(err error) bool {
|
||||
}
|
||||
switch err.(type) {
|
||||
case net.Error:
|
||||
switch err.(type) {
|
||||
switch e := err.(type) {
|
||||
case *net.DNSError, *net.OpError, net.UnknownNetworkError:
|
||||
return true
|
||||
case *url.Error:
|
||||
// Fixes https://github.com/minio/minio/issues/4050
|
||||
switch e.Err.(type) {
|
||||
case *net.DNSError, *net.OpError, net.UnknownNetworkError:
|
||||
return true
|
||||
}
|
||||
// For a URL error, where it replies back "connection closed"
|
||||
// retry again.
|
||||
if strings.Contains(err.Error(), "Connection closed by foreign host") {
|
||||
@@ -127,6 +132,7 @@ func lookupEndpoint(urlStr string) error {
|
||||
resp, derr := client.Do(req)
|
||||
if derr != nil {
|
||||
if isNetErrorIgnored(derr) {
|
||||
errorIf(derr, "Unable to lookup webhook endpoint %s", urlStr)
|
||||
return nil
|
||||
}
|
||||
return derr
|
||||
|
||||
Reference in New Issue
Block a user