mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 13:21:00 +02:00
recipient websockets should check for errors
This commit is contained in:
parent
6a07e1538d
commit
ea9aa3f8ec
1 changed files with 3 additions and 0 deletions
|
@ -426,6 +426,9 @@ func (cr *Croc) receive(forceSend int, serverAddress string, tcpPorts []string,
|
|||
for {
|
||||
// read from websockets
|
||||
websocketMessageData := <-websocketMessages
|
||||
if bytes.HasPrefix(websocketMessageData.message, []byte("error")) {
|
||||
return fmt.Errorf("%s", websocketMessageData.message)
|
||||
}
|
||||
if websocketMessageData.messageType != websocket.BinaryMessage {
|
||||
continue
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue