From 53e0585f21716bd69b7eb4f8136b51a9bee0d3b2 Mon Sep 17 00:00:00 2001 From: Zack Scholl Date: Tue, 10 Jul 2018 13:59:44 -0700 Subject: [PATCH] bar finish in wrong spot --- src/client.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/client.go b/src/client.go index a717996..ef8d246 100644 --- a/src/client.go +++ b/src/client.go @@ -484,7 +484,6 @@ func (c *Croc) dialUp() (err error) { log.Debugf("receiving file into %s", receiveFileName) err = c.receiveFile(receiveFileName, i, connection) } - c.bar.Finish() errorChan <- err }(channel, uuid, port, i, errorChan) } @@ -499,6 +498,9 @@ func (c *Croc) dialUp() (err error) { c.cs.channel.ws.WriteJSON(c.cs.channel) } } + // close bar + c.bar.Finish() + // measure transfer time c.cs.Lock() c.cs.channel.transferTime = time.Since(c.cs.channel.startTransfer) c.cs.Unlock()