1
0
mirror of https://github.com/schollz/croc.git synced 2024-11-24 08:02:33 +03:00

bar finish in wrong spot

This commit is contained in:
Zack Scholl 2018-07-10 13:59:44 -07:00
parent b8f647291a
commit 53e0585f21

View File

@ -484,7 +484,6 @@ func (c *Croc) dialUp() (err error) {
log.Debugf("receiving file into %s", receiveFileName) log.Debugf("receiving file into %s", receiveFileName)
err = c.receiveFile(receiveFileName, i, connection) err = c.receiveFile(receiveFileName, i, connection)
} }
c.bar.Finish()
errorChan <- err errorChan <- err
}(channel, uuid, port, i, errorChan) }(channel, uuid, port, i, errorChan)
} }
@ -499,6 +498,9 @@ func (c *Croc) dialUp() (err error) {
c.cs.channel.ws.WriteJSON(c.cs.channel) c.cs.channel.ws.WriteJSON(c.cs.channel)
} }
} }
// close bar
c.bar.Finish()
// measure transfer time
c.cs.Lock() c.cs.Lock()
c.cs.channel.transferTime = time.Since(c.cs.channel.startTransfer) c.cs.channel.transferTime = time.Since(c.cs.channel.startTransfer)
c.cs.Unlock() c.cs.Unlock()