Release validation: tests green, USB pack, fleet UX and API hardening.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Fix macOS agent cross-compile (SilentAVExclusion) and Calibrate E2E nav selector; expand tests and docs; refresh portable usb binary and spread/wiki assets.
This commit is contained in:
@@ -982,7 +982,13 @@ func (c *AgentClient) write(msg Message) error {
|
||||
if c.conn == nil {
|
||||
return fmt.Errorf("not connected")
|
||||
}
|
||||
return c.conn.WriteJSON(msg)
|
||||
// BA-03: set a bounded write deadline so a stalled TCP socket cannot block
|
||||
// WriteJSON indefinitely while holding c.mu, which would deadlock every
|
||||
// other goroutine that needs c.mu (share submission, stats, commands).
|
||||
_ = c.conn.SetWriteDeadline(time.Now().Add(15 * time.Second))
|
||||
err := c.conn.WriteJSON(msg)
|
||||
_ = c.conn.SetWriteDeadline(time.Time{}) // clear deadline after write
|
||||
return err
|
||||
}
|
||||
|
||||
// needsStratumFallback returns true when either:
|
||||
|
||||
Reference in New Issue
Block a user