mirror of
https://github.com/fluencelabs/tendermint
synced 2025-05-07 04:22:14 +00:00
Remove go-alert dependency
This commit is contained in:
parent
e8538d606a
commit
1d9e89812a
@ -10,7 +10,6 @@ import (
|
|||||||
"runtime/debug"
|
"runtime/debug"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/tendermint/go-alert"
|
|
||||||
. "github.com/tendermint/go-common"
|
. "github.com/tendermint/go-common"
|
||||||
. "github.com/tendermint/go-rpc/types"
|
. "github.com/tendermint/go-rpc/types"
|
||||||
//"github.com/tendermint/go-wire"
|
//"github.com/tendermint/go-wire"
|
||||||
@ -112,12 +111,3 @@ func (w *ResponseWriterWrapper) WriteHeader(status int) {
|
|||||||
func (w *ResponseWriterWrapper) Hijack() (net.Conn, *bufio.ReadWriter, error) {
|
func (w *ResponseWriterWrapper) Hijack() (net.Conn, *bufio.ReadWriter, error) {
|
||||||
return w.ResponseWriter.(http.Hijacker).Hijack()
|
return w.ResponseWriter.(http.Hijacker).Hijack()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stick it as a deferred statement in gouroutines to prevent the program from crashing.
|
|
||||||
func Recover(daemonName string) {
|
|
||||||
if e := recover(); e != nil {
|
|
||||||
stack := string(debug.Stack())
|
|
||||||
errorString := fmt.Sprintf("[%s] %s\n%s", daemonName, e, stack)
|
|
||||||
alert.Alert(errorString)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user