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

debugging

This commit is contained in:
Zack Scholl 2019-04-11 09:37:22 -07:00
parent c71fb49d27
commit 1f3711fdba

View file

@ -148,13 +148,14 @@ func (s *Session) receiveData(pathToFile string, fileSize int64) error {
}
}
f, err := os.OpenFile(pathToFile, os.O_RDWR|os.O_CREATE, 0755)
f, err := os.Open(pathToFile)
if err != nil {
return err
}
defer func() {
log.Debugln("Stopped receiving data...")
f.Close()
os.Exit(0)
}()
firstByte := true