diff --git a/error.go b/error.go index 7344202..cabbb39 100644 --- a/error.go +++ b/error.go @@ -1,5 +1,7 @@ package aliacm +import "context" + // Error ACM错误 type Error string @@ -14,7 +16,9 @@ const ( // ShouldIgnore 忽略一些不想关心的错误 func ShouldIgnore(err error) bool { - if err == serviceUnavailableErr || err == internalServerErr { + if err == serviceUnavailableErr || + err == internalServerErr || + err == context.Canceled { return true } return false diff --git a/time.go b/time.go index 5ce637d..4fab9d0 100644 --- a/time.go +++ b/time.go @@ -5,7 +5,7 @@ import ( ) const ( - apiTimeout = 3 * time.Second + apiTimeout = 5 * time.Second ) func timeInMilli() int64 {