mirror of https://github.com/schollz/croc.git
recipient websockets should check for errors
This commit is contained in:
parent
6a07e1538d
commit
ea9aa3f8ec
|
@ -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…
Reference in New Issue