lnwire: properly return UnknownMessage if we encounter an unknown message type
This commit is contained in:
1 file changed
+1
-1
+1
-1
@@ -192,7 +192,7 @@ func makeEmptyMessage(msgType MessageType) (Message, error) {
|
|||||||
case MsgPong:
|
case MsgPong:
|
||||||
msg = &Pong{}
|
msg = &Pong{}
|
||||||
default:
|
default:
|
||||||
return nil, fmt.Errorf("unknown message type [%d]", msgType)
|
return nil, &UnknownMessage{msgType}
|
||||||
}
|
}
|
||||||
|
|
||||||
return msg, nil
|
return msg, nil
|
||||||
|
|||||||
Reference in new issue
Block a user