Browse Source

close scp connection after sending file

master
an 10 months ago
parent
commit
dd23235c21
1 changed files with 1 additions and 0 deletions
  1. 1
    0
      main.go

+ 1
- 0
main.go View File

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

Loading…
Cancel
Save