1
1
Fork 0
mirror of https://github.com/schollz/croc.git synced 2025-10-11 13:21:00 +02:00

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

View file

@ -87,6 +87,7 @@ type Client struct {
bar *progressbar.ProgressBar bar *progressbar.ProgressBar
spinner *spinner.Spinner spinner *spinner.Spinner
machineID string machineID string
firstSend bool
mutex *sync.Mutex mutex *sync.Mutex
quit chan bool quit chan bool
@ -671,7 +672,10 @@ func (c *Client) updateState() (err error) {
} }
if c.Options.IsSender && c.Step3RecipientRequestFile && !c.Step4FileTransfer { if c.Options.IsSender && c.Step3RecipientRequestFile && !c.Step4FileTransfer {
log.Debug("start sending data!") 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 c.Step4FileTransfer = true
// setup the progressbar // setup the progressbar
c.setBar() c.setBar()