@@ -55,7 +55,7 @@ type Conn struct {
5555 writeHeaderBuf []byte
5656 writeHeader * header
5757 // read limit for a message in bytes.
58- msgReadLimit * atomicInt64
58+ msgReadLimit * atomicInt64
5959
6060 // Used to ensure a previous writer is not used after being closed.
6161 activeWriter atomic.Value
@@ -69,7 +69,7 @@ type Conn struct {
6969 activeReader * messageReader
7070 // readFrameLock is acquired to read from bw.
7171 readFrameLock chan struct {}
72- readClosed * atomicInt64
72+ isReadClosed * atomicInt64
7373 readHeaderBuf []byte
7474 controlPayloadBuf []byte
7575
@@ -105,7 +105,7 @@ func (c *Conn) init() {
105105 c .writeHeaderBuf = makeWriteHeaderBuf ()
106106 c .writeHeader = & header {}
107107 c .readHeaderBuf = makeReadHeaderBuf ()
108- c .readClosed = & atomicInt64 {}
108+ c .isReadClosed = & atomicInt64 {}
109109 c .controlPayloadBuf = make ([]byte , maxControlFramePayload )
110110
111111 runtime .SetFinalizer (c , func (c * Conn ) {
@@ -342,7 +342,7 @@ func (c *Conn) handleControl(ctx context.Context, h header) error {
342342// See https://github.com/nhooyr/websocket/issues/87#issue-451703332
343343// Most users should not need this.
344344func (c * Conn ) Reader (ctx context.Context ) (MessageType , io.Reader , error ) {
345- if c .readClosed .Load () == 1 {
345+ if c .isReadClosed .Load () == 1 {
346346 return 0 , nil , fmt .Errorf ("websocket connection read closed" )
347347 }
348348
0 commit comments