diff options
author | Ludovic Courtès <ludo@gnu.org> | 2017-07-25 21:37:06 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2017-07-25 23:24:15 +0200 |
commit | 236cae0628fd02002ec2c5e0405880908f244b56 (patch) | |
tree | 20044201b0c8cb5110e7557402659f948692b2e4 | |
parent | af79852c99ef25f6d661c470f1d020e69ef34f1f (diff) | |
download | guix-236cae0628fd02002ec2c5e0405880908f244b56.tar guix-236cae0628fd02002ec2c5e0405880908f244b56.tar.gz |
offload: Disconnect sessions created by 'machine-load'.
This fixes a memory leak that can be seen by running:
(map (lambda _ (machine-load m)) (iota 1000))
* guix/scripts/offload.scm (machine-load): Add call to 'disconnect!'.
-rw-r--r-- | guix/scripts/offload.scm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm index 566d117b02..868f54d1c6 100644 --- a/guix/scripts/offload.scm +++ b/guix/scripts/offload.scm @@ -400,6 +400,7 @@ allowed on MACHINE. Return +∞ if MACHINE is unreachable." "cat" "/proc/loadavg")) (line (read-line pipe))) (close-port pipe) + (disconnect! session) (if (eof-object? line) +inf.0 ;MACHINE does not respond, so assume it is infinitely loaded |