File: src/server/server.zig:389–393, src/server/server.zig:2172–2190
Severity: CRITICAL
Status: ✅ FIXED — updated killSession and killAllSessions to explicitly remove PTY master fds from the loop when a session/pane is destroyed, and updated handlePtyEvent to proactively remove stale pane fds from the loop when detected.
When a session or window is killed, its panes are deinitialized, closing their PTY master file descriptors. However, the server was failing to remove these closed file descriptors from its poll event loop (self.loop.fds). Because the closed fds remained registered, poll continuously returned them with events (such as POLLNVAL), causing the single-threaded server daemon to enter an infinite 100% CPU busy-loop. This rendered the daemon completely unresponsive to any new client connections, causing subsequent commands to fail with connection resets (ECONNRESET).
| Severity | Count | Fixed | False Positive | Unresolved |
|---|---|---|---|---|
| Critical | 25 | 22 | 3 | 0 |
| High | 48 (43+5) | 47 | 1 | 0 |
| Medium | 70 (65+5) | 68 | 2 | 0 |
| Low | 63 (61+2) | 60 | 3 | 0 |
| Total | 206 (197+9) | 197 | 9 | 0 |