close scp connection after sending file

This commit is contained in:
an 2018-08-29 23:24:33 +02:00
parent 4afa434702
commit dd23235c21
1 changed files with 1 additions and 0 deletions

View File

@ -69,6 +69,7 @@ func gzipAndSend(l []byte) {
fmt.Printf(err.Error() + "\n")
return
}
defer client.Close()
t := time.Now()
date := t.Format("20060102150405")
client.CopyFile(r, *filePrefix+date+".gz", "0644")