Skip to content

Commit bf2419e

Browse files
committed
add comment
1 parent 51213c8 commit bf2419e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

go/stream.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ func (c *client) newStream(ctx context.Context, httpClient *http.Client, feedIDs
137137
return
138138
}
139139
go s.monitorConn(conn)
140+
// Lock is aquired here to prevent race condition with Close() occuring
141+
// during this background reconnect attempt
140142
s.closingMutex.Lock()
141143
s.conns = append(s.conns, conn)
142144
s.closingMutex.Unlock()

0 commit comments

Comments
 (0)