Fixed memory leak.

c.Msg was never getting closed on client exit. This should fix issue #48
This commit is contained in:
empathetic-alligator 2014-12-14 18:49:44 -05:00
parent a24aa73430
commit 49accaa785

View File

@ -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)
}()