diff options
| author | historia <[not public]> | 2026-10-05 17:39:06 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-10-05 17:39:06 -0400 |
| commit | ec703a39738fefb60817f5659f76f8e683f8d301 (patch) | |
| tree | 00d1242d9f94bc2fec48331d8c02909be6b37f7a /internal/net/conn.go | |
| parent | 516fd29da423432ef6dfded21a984f1d15dcab1a (diff) | |
| download | thehouseoficarus-ec703a39738fefb60817f5659f76f8e683f8d301.tar.gz | |
fix: admin undo/redo failure, video poker cabinet ids, room ref behavior
Diffstat (limited to 'internal/net/conn.go')
| -rw-r--r-- | internal/net/conn.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/internal/net/conn.go b/internal/net/conn.go index a4be83a..d8c867e 100644 --- a/internal/net/conn.go +++ b/internal/net/conn.go @@ -79,7 +79,11 @@ func (t *tcpConn) ReadMessage() (string, error) { text = stripIAC(text) text = truncateLine(text, maxLineLength) if t.echoOff.Load() { - t.conn.Write([]byte("\r\n")) + // Refresh the write deadline: the writer goroutine may have left a + // stale deadline in the past, which would silently drop this echo on + // an idle connection. + _ = t.conn.SetWriteDeadline(time.Now().Add(writeDeadline)) + _, _ = t.conn.Write([]byte("\r\n")) } return text, nil } |
