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!'.
This commit is contained in:
parent
af79852c99
commit
236cae0628
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user