@@ -275,6 +275,8 @@ func testLogger() Logger {
275275// (e.g. "OUT_OF_ORDER_SEQUENCE_NUMBER"). When a match is found, the entire
276276// backlog is dumped first, then the triggering message, so the output shows
277277// full context leading up to the event.
278+ var _ = newRingLogger (nil , 0 ).flush
279+
278280type ringLogEntry struct {
279281 level LogLevel
280282 msg string
@@ -294,7 +296,7 @@ func newRingLogger(real Logger, size int) *ringLogger {
294296 return & ringLogger {buf : make ([]ringLogEntry , size ), size : size , real : real }
295297}
296298
297- func (r * ringLogger ) Level () LogLevel { return LogLevelDebug }
299+ func (* ringLogger ) Level () LogLevel { return LogLevelDebug }
298300
299301func (r * ringLogger ) Log (level LogLevel , msg string , keyvals ... any ) {
300302 r .mu .Lock ()
@@ -321,7 +323,7 @@ func (r *ringLogger) Log(level LogLevel, msg string, keyvals ...any) {
321323 }
322324}
323325
324- func (r * ringLogger ) shouldFlush (msg string , keyvals []any ) bool {
326+ func (* ringLogger ) shouldFlush (msg string , keyvals []any ) bool {
325327 // Add needle strings here to auto-flush on specific log patterns.
326328 // Check both msg and keyvals, since error text can appear in either
327329 // depending on the code path.
@@ -381,15 +383,15 @@ type chaosConn struct {
381383
382384func (c * chaosConn ) Read (p []byte ) (int , error ) {
383385 if time .Now ().After (c .deadline ) {
384- c .once .Do (func () { c .Conn . Close () })
386+ c .once .Do (func () { c .Close () })
385387 return 0 , net .ErrClosed
386388 }
387389 return c .Conn .Read (p )
388390}
389391
390392func (c * chaosConn ) Write (p []byte ) (int , error ) {
391393 if time .Now ().After (c .deadline ) {
392- c .once .Do (func () { c .Conn . Close () })
394+ c .once .Do (func () { c .Close () })
393395 return 0 , net .ErrClosed
394396 }
395397 return c .Conn .Write (p )
0 commit comments