don't show ui each time

This commit is contained in:
Zack Scholl 2019-05-01 17:52:37 -06:00
parent 67f69c892d
commit 2b42c5365c
1 changed files with 5 additions and 1 deletions

View File

@ -87,6 +87,7 @@ type Client struct {
bar *progressbar.ProgressBar
spinner *spinner.Spinner
machineID string
firstSend bool
mutex *sync.Mutex
quit chan bool
@ -671,7 +672,10 @@ func (c *Client) updateState() (err error) {
}
if c.Options.IsSender && c.Step3RecipientRequestFile && !c.Step4FileTransfer {
log.Debug("start sending data!")
fmt.Fprintf(os.Stderr, "\nSending (->%s)\n", c.ExternalIPConnected)
if !c.firstSend {
fmt.Fprintf(os.Stderr, "\nSending (->%s)\n", c.ExternalIPConnected)
c.firstSend = true
}
c.Step4FileTransfer = true
// setup the progressbar
c.setBar()