lnwire: properly return UnknownMessage if we encounter an unknown message type

This commit is contained in:
Olaoluwa Osuntokun 2018-03-30 14:25:23 -07:00
parent 90636b49b2
commit 9dee2ce8f2
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21

@ -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