fix: need to handle no network id
This commit is contained in:
parent
a9fb6aedb9
commit
1b8ba683c0
|
@ -71,8 +71,19 @@ func (h *HandshakeOpen) DecodeMessage(dec *msgpack.Decoder) error {
|
|||
|
||||
h.handshake = handshake
|
||||
|
||||
networkId, err := dec.DecodeString()
|
||||
_, err = dec.PeekCode()
|
||||
|
||||
networkId := ""
|
||||
|
||||
if err != nil {
|
||||
if err.Error() != "EOF" {
|
||||
return err
|
||||
}
|
||||
h.networkId = networkId
|
||||
return nil
|
||||
}
|
||||
|
||||
networkId, err = dec.DecodeString()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue