Skip to content

Commit

Permalink
GODRIVER-3013 Resolve race test failures (#1425)
Browse files Browse the repository at this point in the history
  • Loading branch information
prestonvasquez committed Oct 18, 2023
1 parent 38ed5bb commit 1dbe6de
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mongo/integration/unified/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ func newLogger(olm *observeLogMessages, bufSize int) *Logger {
// Info implements the logger.Sink interface's "Info" method for printing log
// messages.
func (log *Logger) Info(level int, msg string, args ...interface{}) {
log.orderMu.Lock()
defer log.orderMu.Unlock()

if log.logQueue == nil {
return
}
Expand All @@ -62,9 +65,6 @@ func (log *Logger) Info(level int, msg string, args ...interface{}) {
return
}

log.orderMu.Lock()
defer log.orderMu.Unlock()

defer func() { log.lastOrder++ }()

// Add the Diff back to the level, as there is no need to create a
Expand Down

0 comments on commit 1dbe6de

Please sign in to comment.