feat: seperate close function into tiny helper function

This commit is contained in:
2026-07-12 01:20:22 +07:00
parent efbff0f7f7
commit 0a5f673c68
5 changed files with 67 additions and 35 deletions
+3 -1
View File
@@ -164,7 +164,9 @@ func (s *session) setupInteractiveMode(channel ssh.NewChannel) error {
}
}()
s.lifecycle.SetChannel(ch)
if err = s.lifecycle.SetChannel(ch); err != nil {
return err
}
s.interaction.SetChannel(ch)
s.interaction.SetMode(types.InteractiveModeINTERACTIVE)