From 49accaa785bdf9f5049de6291ec4ec3fba306272 Mon Sep 17 00:00:00 2001 From: empathetic-alligator Date: Sun, 14 Dec 2014 18:49:44 -0500 Subject: [PATCH] Fixed memory leak. c.Msg was never getting closed on client exit. This should fix issue #48 --- client.go | 1 + 1 file changed, 1 insertion(+) diff --git a/client.go b/client.go index 805fa5c..004a57c 100644 --- a/client.go +++ b/client.go @@ -160,6 +160,7 @@ func (c *Client) handleShell(channel ssh.Channel) { go func() { // Block until done, then remove. c.Conn.Wait() + close(c.Msg) c.Server.Remove(c) }()