Skip to content

Commit 1357a3a

Browse files
authored
chore: improve logging and x11 handler call (#18422)
* use `ctx` instead of `session.Context()` for consistency * log SSH connection start with the phrase `ssh connection` for symmetry with the stop log and ease of `grep`'ing.
1 parent 8f6a5af commit 1357a3a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

agent/agentssh/agentssh.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ func (s *Server) sessionHandler(session ssh.Session) {
454454

455455
x11, hasX11 := session.X11()
456456
if hasX11 {
457-
display, handled := s.x11Handler(session.Context(), x11)
457+
display, handled := s.x11Handler(ctx, x11)
458458
if !handled {
459459
logger.Error(ctx, "x11 handler failed")
460460
closeCause("x11 handler failed")
@@ -973,7 +973,7 @@ func (s *Server) handleConn(l net.Listener, c net.Conn) {
973973
return
974974
}
975975
defer s.trackConn(l, c, false)
976-
logger.Info(context.Background(), "started serving connection")
976+
logger.Info(context.Background(), "started serving ssh connection")
977977
// note: srv.ConnectionCompleteCallback logs completion of the connection
978978
s.srv.HandleConn(c)
979979
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy