[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/03: offload: Disconnect sessions created by 'machine-load'.
From: |
Ludovic Courtès |
Subject: |
01/03: offload: Disconnect sessions created by 'machine-load'. |
Date: |
Tue, 25 Jul 2017 17:24:27 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 236cae0628fd02002ec2c5e0405880908f244b56
Author: Ludovic Courtès <address@hidden>
Date: Tue Jul 25 21:37:06 2017 +0200
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 566d117..868f54d 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