Abort VNC agent dial retry loop on server shutdown

This commit is contained in:
Viktor Liu
2026-05-21 17:44:22 +02:00
parent c0a3a2ee6d
commit ec464cb0ec
3 changed files with 27 additions and 8 deletions
+1 -1
View File
@@ -308,7 +308,7 @@ func (s *Server) handleServiceConnection(conn net.Conn, sm *sessionManager) {
Reader: io.MultiReader(&headerBuf, conn),
Conn: conn,
}
proxyToAgent(replayConn, agentPort, sm.AuthToken())
proxyToAgent(s.ctx, replayConn, agentPort, sm.AuthToken())
}
// prefixConn wraps a net.Conn, overriding Read to use a different reader.