mirror of
https://github.com/minio/minio.git
synced 2025-11-25 12:06:10 -05:00
Enable event persistence in Redis (#7601)
This commit is contained in:
committed by
kannappanr
parent
9389a55e5d
commit
2b9b907f9c
@@ -79,6 +79,20 @@ func replayEvents(store Store, doneCh <-chan struct{}) <-chan string {
|
||||
return eventKeyCh
|
||||
}
|
||||
|
||||
// IsConnRefusedErr - To check fot "connection refused" error.
|
||||
func IsConnRefusedErr(err error) bool {
|
||||
if opErr, ok := err.(*net.OpError); ok {
|
||||
if sysErr, ok := opErr.Err.(*os.SyscallError); ok {
|
||||
if errno, ok := sysErr.Err.(syscall.Errno); ok {
|
||||
if errno == syscall.ECONNREFUSED {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// isConnResetErr - Checks for connection reset errors.
|
||||
func isConnResetErr(err error) bool {
|
||||
if opErr, ok := err.(*net.OpError); ok {
|
||||
|
||||
Reference in New Issue
Block a user