mirror of
https://github.com/ddworken/hishtory.git
synced 2025-06-25 06:22:24 +02:00
Treat i/o timeouts as offline errors too
This commit is contained in:
parent
0342ca28ad
commit
2c6061e497
@ -976,7 +976,8 @@ func IsOfflineError(err error) bool {
|
|||||||
strings.Contains(err.Error(), "read: connection reset by peer") ||
|
strings.Contains(err.Error(), "read: connection reset by peer") ||
|
||||||
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")
|
||||||
}
|
}
|
||||||
|
|
||||||
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