Skip to content

Commit 1ddeaeb

Browse files
committed
refactor(ssh): use context control on keep alive between agent and client
1 parent dc9dcd7 commit 1ddeaeb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ssh/session/session.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -691,8 +691,8 @@ func Event[D any](sess *Session, t string, data []byte, seat int) {
691691
})
692692
}
693693

694-
func (s *Session) KeepAlive() error {
695-
if err := s.api.KeepAliveSession(context.TODO(), s.UID); err != nil {
694+
func (s *Session) KeepAlive(ctx context.Context) error {
695+
if err := s.api.KeepAliveSession(ctx, s.UID); err != nil {
696696
log.WithError(err).
697697
WithFields(log.Fields{"session": s.UID, "sshid": s.SSHID}).
698698
Error("Error when trying to keep alive the session")

0 commit comments

Comments
 (0)