Skip to content

Commit

Permalink
bar finish in wrong spot
Browse files Browse the repository at this point in the history
  • Loading branch information
schollz committed Jul 10, 2018
1 parent b8f6472 commit 53e0585
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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()
Expand Down

0 comments on commit 53e0585

Please sign in to comment.