From 3c0371986315b915bc2f0b9ea0c3e20c07acccb4 Mon Sep 17 00:00:00 2001 From: Zack Scholl Date: Thu, 21 Nov 2019 15:10:21 -0800 Subject: [PATCH] need to close goroutine corrrectly --- src/croc/croc.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/croc/croc.go b/src/croc/croc.go index e11c08e..eacb0d7 100644 --- a/src/croc/croc.go +++ b/src/croc/croc.go @@ -376,8 +376,8 @@ func (c *Client) Send(options TransferOptions) (err error) { } else { log.Debugf("[%+v] got weird bytes: %+v", conn, data) // throttle the reading - time.Sleep(100 * time.Millisecond) - break + errchan <- fmt.Errorf("gracefully refusing using the public relay") + return } }