@@ -57,10 +57,10 @@ type BufferedSender struct {
57
57
// queueMu protects the buffer queue.
58
58
queueMu struct {
59
59
syncutil.Mutex
60
- stopped bool
61
- buffer * eventQueue
62
- capacity int64
63
- overflow bool
60
+ stopped bool
61
+ buffer * eventQueue
62
+ capacity int64
63
+ overflowed bool
64
64
}
65
65
66
66
// notifyDataC is used to notify the BufferedSender.run goroutine that there
@@ -100,13 +100,13 @@ func (bs *BufferedSender) sendBuffered(
100
100
if bs .queueMu .stopped {
101
101
return errors .New ("stream sender is stopped" )
102
102
}
103
- if bs .queueMu .overflow {
103
+ if bs .queueMu .overflowed {
104
104
// Is this too spammy
105
105
log .Dev .Error (context .Background (), "buffer capacity exceeded" )
106
106
return newRetryErrBufferCapacityExceeded ()
107
107
}
108
108
if bs .queueMu .buffer .len () >= bs .queueMu .capacity {
109
- bs .queueMu .overflow = true
109
+ bs .queueMu .overflowed = true
110
110
return newRetryErrBufferCapacityExceeded ()
111
111
}
112
112
// TODO(wenyihu6): pass an actual context here
@@ -176,7 +176,7 @@ func (bs *BufferedSender) popFront() (
176
176
bs .queueMu .Lock ()
177
177
defer bs .queueMu .Unlock ()
178
178
event , ok := bs .queueMu .buffer .popFront ()
179
- return event , ok , bs .queueMu .overflow , bs .queueMu .buffer .len ()
179
+ return event , ok , bs .queueMu .overflowed , bs .queueMu .buffer .len ()
180
180
}
181
181
182
182
// cleanup is called when the sender is stopped. It is expected to free up
0 commit comments