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