mirror of
https://github.com/ddworken/hishtory.git
synced 2025-06-24 05:51:38 +02:00
Treat connect timeouts as network failures to fix #30
This commit is contained in:
parent
b27a5b3af5
commit
a18d444d09
@ -1263,7 +1263,8 @@ func IsOfflineError(err error) bool {
|
|||||||
strings.Contains(err.Error(), ": EOF") ||
|
strings.Contains(err.Error(), ": EOF") ||
|
||||||
strings.Contains(err.Error(), ": status_code=502") ||
|
strings.Contains(err.Error(), ": status_code=502") ||
|
||||||
strings.Contains(err.Error(), ": status_code=503") ||
|
strings.Contains(err.Error(), ": status_code=503") ||
|
||||||
strings.Contains(err.Error(), ": i/o timeout")
|
strings.Contains(err.Error(), ": i/o timeout") ||
|
||||||
|
strings.Contains(err.Error(), "connect: operation timed out")
|
||||||
}
|
}
|
||||||
|
|
||||||
func ReliableDbCreate(db *gorm.DB, entry interface{}) error {
|
func ReliableDbCreate(db *gorm.DB, entry interface{}) error {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user