diff --git a/internal/multiplex/session.go b/internal/multiplex/session.go index c4a590f..f30717f 100644 --- a/internal/multiplex/session.go +++ b/internal/multiplex/session.go @@ -173,6 +173,7 @@ func (sesh *Session) timeoutAfter(to time.Duration) { sesh.streamsM.Lock() if len(sesh.streams) == 0 && !sesh.IsBroken() { sesh.streamsM.Unlock() + sesh.SetTerminalMsg("timeout") sesh.Close() } else { sesh.streamsM.Unlock() diff --git a/internal/multiplex/switchboard.go b/internal/multiplex/switchboard.go index feb73fd..2fdc2fc 100644 --- a/internal/multiplex/switchboard.go +++ b/internal/multiplex/switchboard.go @@ -105,6 +105,7 @@ func (sb *switchboard) removeConn(closing *connEnclave) { } } if len(sb.ces) == 0 { + sb.session.SetTerminalMsg("no underlying connection left") sb.session.Close() } sb.cesM.Unlock() diff --git a/internal/server/activeuser.go b/internal/server/activeuser.go index 24b0b64..282f42f 100644 --- a/internal/server/activeuser.go +++ b/internal/server/activeuser.go @@ -48,7 +48,6 @@ func (u *ActiveUser) GetSession(sessionID uint32, obfs mux.Obfser, deobfs mux.De } } -// TODO: allow message to pass through this and sesh.Close() func (u *ActiveUser) Terminate(reason string) { u.sessionsM.Lock() for _, sesh := range u.sessions {