From 236cae0628fd02002ec2c5e0405880908f244b56 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 25 Jul 2017 21:37:06 +0200 Subject: 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!'. --- guix/scripts/offload.scm | 1 + 1 file changed, 1 insertion(+) 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 -- cgit v1.2.3