mirror of https://github.com/schollz/croc.git
Only print if main thread
This commit is contained in:
parent
d9e5695e71
commit
550bd9a8e6
|
@ -202,7 +202,9 @@ func (c *Connection) runClient() error {
|
||||||
logger.Debug("waiting for ok from relay")
|
logger.Debug("waiting for ok from relay")
|
||||||
message = receiveMessage(connection)
|
message = receiveMessage(connection)
|
||||||
if message == "no" {
|
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
|
gotConnectionInUse = true
|
||||||
} else {
|
} else {
|
||||||
logger.Debug("got ok from relay")
|
logger.Debug("got ok from relay")
|
||||||
|
@ -221,7 +223,9 @@ func (c *Connection) runClient() error {
|
||||||
logger.Debug("waiting for meta data from sender")
|
logger.Debug("waiting for meta data from sender")
|
||||||
message = receiveMessage(connection)
|
message = receiveMessage(connection)
|
||||||
if message == "no" {
|
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
|
gotConnectionInUse = true
|
||||||
} else {
|
} else {
|
||||||
m := strings.Split(message, "-")
|
m := strings.Split(message, "-")
|
||||||
|
|
Loading…
Reference in New Issue