fix: remove conections on session end

This commit is contained in:
Jon Lundy 2021-08-26 15:09:06 -06:00
parent f11887ab0e
commit 43b052daab
No known key found for this signature in database
GPG Key ID: 13022278CED7D8EC

View File

@ -129,6 +129,7 @@ func (srv *server) newSession(ctx context.Context) func(ssh.Session) {
<-ctx.Done() <-ctx.Done()
srv.ports.Delete(s.User())
if _, err := fmt.Fprintf(s, "Goodbye! %s\n", s.User()); err != nil { if _, err := fmt.Fprintf(s, "Goodbye! %s\n", s.User()); err != nil {
return return
} }