From 70f62996eb6235020c88e5bc3641a22c9ba501c5 Mon Sep 17 00:00:00 2001 From: Ben Brooks Date: Mon, 13 Jul 2026 20:22:14 +0100 Subject: [PATCH] Increase hardcoded control frame read/write timeouts to 20 sec Fixes #555 --- read.go | 2 +- write.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/read.go b/read.go index c19f41de..70ffe093 100644 --- a/read.go +++ b/read.go @@ -300,7 +300,7 @@ func (c *Conn) handleControl(ctx context.Context, h header) (err error) { return err } - ctx, cancel := context.WithTimeout(ctx, time.Second*5) + ctx, cancel := context.WithTimeout(ctx, time.Second*20) defer cancel() b := c.readControlBuf[:h.payloadLength] diff --git a/write.go b/write.go index 81bab4fa..e197b675 100644 --- a/write.go +++ b/write.go @@ -274,7 +274,7 @@ func (mw *msgWriter) close() { } func (c *Conn) writeControl(ctx context.Context, opcode opcode, p []byte) error { - ctx, cancel := context.WithTimeout(ctx, time.Second*5) + ctx, cancel := context.WithTimeout(ctx, time.Second*20) defer cancel() _, err := c.writeFrame(ctx, true, false, opcode, p)