[#389686] Add crash detection logic to daemon
This commit is contained in:
@@ -11,4 +11,17 @@ func IsSuspendedError(err error) bool {
|
||||
_, ok := err.(*suspendedError)
|
||||
|
||||
return ok
|
||||
}
|
||||
}
|
||||
|
||||
type crashTooFrequent struct {
|
||||
}
|
||||
|
||||
func (e *crashTooFrequent) Error() string {
|
||||
return "server has crashed too soon after the last detected crash"
|
||||
}
|
||||
|
||||
func IsTooFrequentCrashError(err error) bool {
|
||||
_, ok := err.(*crashTooFrequent)
|
||||
|
||||
return ok
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user