diff --git a/read.go b/read.go index afd08cc7cdebccceabed33ac547e68211c0e8b69..87151dcb92c77035df9e2c6fdc95bb77b3eb0241 100644 --- a/read.go +++ b/read.go @@ -26,6 +26,11 @@ import ( // Call CloseRead if you do not expect any data messages from the peer. // // Only one Reader may be open at a time. +// +// If you need a separate timeout on the Reader call and the Read itself, +// use time.AfterFunc to cancel the context passed in. +// See https://github.com/nhooyr/websocket/issues/87#issue-451703332 +// Most users should not need this. func (c *Conn) Reader(ctx context.Context) (MessageType, io.Reader, error) { return c.reader(ctx) }