From 516fd29da423432ef6dfded21a984f1d15dcab1a Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Mon, 5 Oct 2026 17:31:50 -0400 Subject: fix: slop casino and economy fixes --- internal/net/conn.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'internal/net/conn.go') diff --git a/internal/net/conn.go b/internal/net/conn.go index ca40354..a4be83a 100644 --- a/internal/net/conn.go +++ b/internal/net/conn.go @@ -23,6 +23,10 @@ type Conn interface { // instead of a hung writer goroutine. Implementations without deadline // support return nil (deadlines are best-effort). SetWriteDeadline(t time.Time) error + // SetReadDeadline is the read-side counterpart: transports implement it so + // a silent peer cannot pin a goroutine and a connection slot forever. + // Implementations without deadline support return nil. + SetReadDeadline(t time.Time) error SetEcho(bool) error } @@ -114,6 +118,10 @@ func (t *tcpConn) SetWriteDeadline(ts time.Time) error { return t.conn.SetWriteDeadline(ts) } +func (t *tcpConn) SetReadDeadline(ts time.Time) error { + return t.conn.SetReadDeadline(ts) +} + func (t *tcpConn) Close() error { return t.conn.Close() } -- cgit v1.2.3