close scp connection after sending file
This commit is contained in:
parent
4afa434702
commit
dd23235c21
1
main.go
1
main.go
|
@ -69,6 +69,7 @@ func gzipAndSend(l []byte) {
|
||||||
fmt.Printf(err.Error() + "\n")
|
fmt.Printf(err.Error() + "\n")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
defer client.Close()
|
||||||
t := time.Now()
|
t := time.Now()
|
||||||
date := t.Format("20060102150405")
|
date := t.Format("20060102150405")
|
||||||
client.CopyFile(r, *filePrefix+date+".gz", "0644")
|
client.CopyFile(r, *filePrefix+date+".gz", "0644")
|
||||||
|
|
Loading…
Reference in New Issue