Skip to content

Commit

Permalink
fix(server): Use local quit message on timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Sep 5, 2023
1 parent 7c640cf commit 5f81050
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/server/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func (s *SSHServer) Handler(m *movie.Movie) bubbletea.ProgramHandler {
timer := time.NewTimer(timeout)
select {
case <-timer.C:
program.Quit()
program.Send(movie.Quit())
case <-session.Context().Done():
}
}
Expand Down
2 changes: 1 addition & 1 deletion internal/server/telnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func (s *TelnetServer) Handler(ctx context.Context, conn net.Conn, m *movie.Movi
timer := time.NewTimer(timeout)
select {
case <-timer.C:
program.Quit()
program.Send(movie.Quit())
case <-ctx.Done():
}
}
Expand Down

0 comments on commit 5f81050

Please sign in to comment.