lnwire: properly return UnknownMessage if we encounter an unknown message type
This commit is contained in:
parent
90636b49b2
commit
9dee2ce8f2
@ -192,7 +192,7 @@ func makeEmptyMessage(msgType MessageType) (Message, error) {
|
||||
case MsgPong:
|
||||
msg = &Pong{}
|
||||
default:
|
||||
return nil, fmt.Errorf("unknown message type [%d]", msgType)
|
||||
return nil, &UnknownMessage{msgType}
|
||||
}
|
||||
|
||||
return msg, nil
|
||||
|
Loading…
Reference in New Issue
Block a user