Skip to content

Commit

Permalink
add runtime recover for DisMsg
Browse files Browse the repository at this point in the history
  • Loading branch information
haijuncai committed Sep 24, 2021
1 parent d834f02 commit cc4004f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dcrm/msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -3152,6 +3152,12 @@ func HandleNoReciv(key string,reqer string,ower string,datatype string,wid int)
//msg: key-enode:C1:X1:X2...:Xn
//msg: key-enode1:NoReciv:enode2:C1
func DisMsg(msg string) {
defer func() {
if r := recover(); r != nil {
fmt.Errorf("DisMsg Runtime error: %v\n%v", r, string(debug.Stack()))
return
}
}()

if msg == "" {
return
Expand Down

0 comments on commit cc4004f

Please sign in to comment.