From 43b052daab118268f11637699c7264985832cbc2 Mon Sep 17 00:00:00 2001 From: Jon Lundy Date: Thu, 26 Aug 2021 15:09:06 -0600 Subject: [PATCH] fix: remove conections on session end --- main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/main.go b/main.go index 4b0c7d1..47255d4 100644 --- a/main.go +++ b/main.go @@ -129,6 +129,7 @@ func (srv *server) newSession(ctx context.Context) func(ssh.Session) { <-ctx.Done() + srv.ports.Delete(s.User()) if _, err := fmt.Fprintf(s, "Goodbye! %s\n", s.User()); err != nil { return }