1
0
mirror of https://github.com/schollz/croc.git synced 2024-11-28 09:35:14 +03:00

Only print if main thread

This commit is contained in:
Zack 2017-10-20 19:51:02 -06:00 committed by GitHub
parent d9e5695e71
commit 550bd9a8e6

View File

@ -202,7 +202,9 @@ func (c *Connection) runClient() error {
logger.Debug("waiting for ok from relay")
message = receiveMessage(connection)
if message == "no" {
fmt.Println("The specifed code is already in use by a sender.")
if id == 0 {
fmt.Println("The specifed code is already in use by a sender.")
}
gotConnectionInUse = true
} else {
logger.Debug("got ok from relay")
@ -221,7 +223,9 @@ func (c *Connection) runClient() error {
logger.Debug("waiting for meta data from sender")
message = receiveMessage(connection)
if message == "no" {
fmt.Println("The specifed code is already in use by a receiver.")
if id == 0 {
fmt.Println("The specifed code is already in use by a sender.")
}
gotConnectionInUse = true
} else {
m := strings.Split(message, "-")