1
0
mirror of https://github.com/schollz/croc.git synced 2024-11-24 08:02:33 +03:00

better error message when interrupting

This commit is contained in:
Zack Scholl 2018-10-21 07:31:35 -07:00
parent 9349496111
commit e591c6afb6
2 changed files with 3 additions and 3 deletions

4
go.mod
View File

@ -2,7 +2,7 @@ module github.com/schollz/croc
require ( require (
github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575
github.com/dustin/go-humanize v0.0.0-20180713052910-9f541cc9db5d github.com/dustin/go-humanize v1.0.0
github.com/fatih/color v1.7.0 // indirect github.com/fatih/color v1.7.0 // indirect
github.com/gorilla/websocket v1.4.0 github.com/gorilla/websocket v1.4.0
github.com/mars9/crypt v0.0.0-20150406101210-65899cf653ff // indirect github.com/mars9/crypt v0.0.0-20150406101210-65899cf653ff // indirect
@ -20,5 +20,5 @@ require (
github.com/tscholl2/siec v0.0.0-20180721101609-21667da05937 github.com/tscholl2/siec v0.0.0-20180721101609-21667da05937
github.com/urfave/cli v1.20.0 github.com/urfave/cli v1.20.0
golang.org/x/crypto v0.0.0-20181015023909-0c41d7ab0a0e golang.org/x/crypto v0.0.0-20181015023909-0c41d7ab0a0e
golang.org/x/net v0.0.0-20181005035420-146acd28ed58 // indirect golang.org/x/net v0.0.0-20181017193950-04a2e542c03f // indirect
) )

View File

@ -178,7 +178,7 @@ func (c *Croc) sendReceive(address, websocketPort string, tcpPorts []string, fna
SetDebugLevel("critical") SetDebugLevel("critical")
} }
log.Debug("interrupt") log.Debug("interrupt")
err = sock.WriteMessage(websocket.TextMessage, []byte("interrupt")) err = sock.WriteMessage(websocket.TextMessage, []byte("error: interrupted by other party"))
if err != nil { if err != nil {
return err return err
} }