Skip to content

Commit f4f6d2d

Browse files
committed
fix: TUI disconnecting after 30 seconds of inactivity
The daemon's subscription handler had a 30-second read timeout that treated timeouts as disconnections. Since the client never sends data after subscribing, the connection was closed after 30 seconds of no events.
1 parent 4e20ce8 commit f4f6d2d

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2121

2222
### Fixed
2323

24+
- **TUI disconnecting after 30 seconds of inactivity**: The daemon's subscription handler had a 30-second read timeout that was incorrectly treating timeouts as disconnections. Since the client never sends data after subscribing, the connection would be closed after 30 seconds of no events, causing the TUI to quit. Removed the timeout so the connection now blocks indefinitely until the client actually disconnects.
2425
- **Runs panel column misalignment**: Fixed status column padding using byte length instead of visual width, causing misaligned columns when Unicode status icons (✓, ◉, ◼) were displayed.
2526
- **Gobfile descriptions not displayed**: Fixed job descriptions from gobfile not appearing in TUI when job already existed without a description.
2627
- **Gobfile auto-stop killing manually started jobs**: Jobs with `autostart = false` in the gobfile are no longer stopped when the TUI exits. Previously, if you defined a job with `autostart = false` and manually started it, it would be killed on TUI exit. Now only jobs with `autostart = true` are auto-stopped.

internal/daemon/daemon.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,6 @@ func (d *Daemon) handleSubscribe(req *Request, conn net.Conn, encoder *json.Enco
803803
// We detect this by trying to read (which will block until close or error)
804804
buf := make([]byte, 1)
805805
for {
806-
conn.SetReadDeadline(time.Now().Add(30 * time.Second))
807806
_, err := conn.Read(buf)
808807
if err != nil {
809808
// Connection closed or error

0 commit comments

Comments
 (0)