multi: stop casting peer warning messages as errors

Split the logic for processing `error` and `warning` messages from our
peers.
This commit is contained in:
positiveblue
2022-08-24 12:26:42 -07:00
parent e65f05360e
commit 4d4d8e480c
8 changed files with 282 additions and 57 deletions

View File

@@ -241,6 +241,11 @@ func WritePongPayload(buf *bytes.Buffer, payload PongPayload) error {
return writeDataWithLength(buf, payload)
}
// WriteWarningData appends the data to the provided buffer.
func WriteWarningData(buf *bytes.Buffer, data WarningData) error {
return writeDataWithLength(buf, data)
}
// WriteErrorData appends the data to the provided buffer.
func WriteErrorData(buf *bytes.Buffer, data ErrorData) error {
return writeDataWithLength(buf, data)