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

no close sender

This commit is contained in:
Zack Scholl 2024-08-29 21:58:24 -07:00
parent e5fac25f30
commit e5d9ac5e5c

View file

@ -1997,12 +1997,14 @@ func (c *Client) receiveData(i int) {
fmt.Print(string(b)) fmt.Print(string(b))
} }
log.Trace("sending close-sender") log.Trace("sending close-sender")
err = message.Send(c.conn[0], c.Key, message.Message{ c.Step4FileTransferred = false
Type: message.TypeCloseSender, c.Step3RecipientRequestFile = false
}) // err = message.Send(c.conn[0], c.Key, message.Message{
if err != nil { // Type: message.TypeCloseSender,
panic(err) // })
} // if err != nil {
// panic(err)
// }
} }
c.mutex.Unlock() c.mutex.Unlock()
} }
@ -2017,6 +2019,9 @@ func (c *Client) sendData(i int) {
if err := c.fread.Close(); err != nil { if err := c.fread.Close(); err != nil {
log.Errorf("error closing file: %v", err) log.Errorf("error closing file: %v", err)
} }
c.bar.Finish()
c.Step4FileTransferred = false
c.Step3RecipientRequestFile = false
} }
}() }()