copy, offload: Explicitly close SSH channels and sessions.
authorLudovic Courtès <ludo@gnu.org>
Sat, 29 Aug 2020 14:05:05 +0000 (16:05 +0200)
committerLudovic Courtès <ludo@gnu.org>
Sat, 29 Aug 2020 14:24:17 +0000 (16:24 +0200)
commit61fe9ced7da7eefceb931af0cb7363b721f5bdd6
tree907eb2e20f57a35a33ba452bd53bca3ef8e00d2c
parentd7965b58d25c9c7648ba5682223f32d759fdffda
copy, offload: Explicitly close SSH channels and sessions.

Fixes <https://bugs.gnu.org/42740>.

* guix/scripts/copy.scm (send-to-remote-host): Keep the result of
'connect-to-remote-daemon' in scope, and explicitly close it after the
call to 'send-files'.
(retrieve-from-remote-host): Explicitly close REMOTE and disconnect
SESSION.
* guix/scripts/offload.scm (transfer-and-offload): Explicitly close
STORE and disconnect SESSION upon completion.
guix/scripts/copy.scm
guix/scripts/offload.scm