Add message when exiting due to potential deadlock

This commit is contained in:
Tulir Asokan 2019-04-27 15:11:27 +03:00
parent 6f54066c43
commit b6b50e8e1d

View File

@ -63,6 +63,7 @@ func Initialize() {
if OnRecover != nil { if OnRecover != nil {
OnRecover() OnRecover()
} }
_, _ = fmt.Fprintf(os.Stderr, "Potential deadlock detected. See %s/deadlock.log for more information.", LogDirectory)
os.Exit(88) os.Exit(88)
} }
_, err = fmt.Fprintf(deadlocks, "======================= Debug init @ %s =======================\n", time.Now().Format("2006-01-02 15:04:05")) _, err = fmt.Fprintf(deadlocks, "======================= Debug init @ %s =======================\n", time.Now().Format("2006-01-02 15:04:05"))