mirror of https://github.com/schollz/croc.git
removed duplicated code on transfer speed message
This commit is contained in:
parent
414507ab1c
commit
36b546406d
|
@ -408,8 +408,6 @@ func (c *Connection) runClient() error {
|
|||
return nil
|
||||
}
|
||||
fmt.Println("\nFile sent.")
|
||||
timeSinceStart:= time.Since(startTime) / time.Second
|
||||
fmt.Printf("\nTransfered with an average speed of %s/s", humanize.Bytes(uint64(float64(c.File.Size)/float64(timeSinceStart))))
|
||||
} else { // Is a Receiver
|
||||
if responses.notPresent {
|
||||
fmt.Println("Sender is not ready. Use -wait to wait until sender connects.")
|
||||
|
@ -468,9 +466,9 @@ func (c *Connection) runClient() error {
|
|||
} else {
|
||||
fmt.Printf("\nReceived file written to %s\n", path.Join(c.Path, c.File.Name))
|
||||
}
|
||||
timeSinceStart:= time.Since(startTime) / time.Second
|
||||
fmt.Printf("\nTransfered with an average speed of %s/s", humanize.Bytes(uint64(float64(c.File.Size)/float64(timeSinceStart))))
|
||||
}
|
||||
timeSinceStart:= time.Since(startTime) / time.Second
|
||||
fmt.Printf("\nTransfered at an average speed of %s/s", humanize.Bytes(uint64(float64(c.File.Size)/float64(timeSinceStart))))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue