Attach to the X server on the active VT and keep a retryable DXGI frame from tearing down the capturer

Claude-Session: https://claude.ai/code/session_01QKDYfH4WKLbpNQHccpVo3P
This commit is contained in:
Viktor Liu
2026-08-29 16:59:05 +02:00
parent 15d6e3bea9
commit fecd7cfff5
17 changed files with 476 additions and 85 deletions
+4 -2
View File
@@ -65,11 +65,13 @@ func (s *Server) serviceAcceptLoop(ln net.Listener) {
if !s.beginHandler() {
s.releaseConnSlot()
s.untrackConn(metered)
_ = conn.Close()
// The wrapper, not the raw conn: newMetricsConn has already
// started a sampling goroutine that only its own Close stops.
_ = metered.Close()
continue
}
go func(c net.Conn) {
defer s.handlers.Done()
defer s.endHandler()
defer s.releaseConnSlot()
defer s.untrackConn(c)
s.handleServiceConnection(c, mgr)