Fix relay close message handling

This commit is contained in:
Zoltán Papp 2024-07-22 13:04:32 +02:00
parent 03df0878dc
commit 0329c12173

View File

@ -43,6 +43,8 @@ func (m MsgType) String() string {
return "transport" return "transport"
case MsgTypeClose: case MsgTypeClose:
return "close" return "close"
case MsgTypeHealthCheck:
return "health check"
default: default:
return "unknown" return "unknown"
} }
@ -150,7 +152,7 @@ func UnmarshalHelloResponse(msg []byte) (string, error) {
func MarshalCloseMsg() []byte { func MarshalCloseMsg() []byte {
msg := make([]byte, 1) msg := make([]byte, 1)
msg[0] = byte(MsgTypeClose) msg[0] = byte(MsgTypeClose)
return healthCheckMsg return msg
} }
// Transport message // Transport message