~ruther/guix-local

236cae0628fd02002ec2c5e0405880908f244b56 — Ludovic Courtès 8 years ago af79852
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!'.
1 files changed, 1 insertions(+), 0 deletions(-)

M guix/scripts/offload.scm
M guix/scripts/offload.scm => guix/scripts/offload.scm +1 -0
@@ 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