bae9f6d
863486a
1 2 3
4
5 6 7
8 9 10 11 12 13 14
15 16 17 18
package request import ( "strings" ) func isErrConnectionReset(err error) bool { if strings.Contains(err.Error(), "read: connection reset") { return false } if strings.Contains(err.Error(), "connection reset") || strings.Contains(err.Error(), "broken pipe") { return true } return false }