Skip to content

Commit

Permalink
GODRIVER-3013 Resolve race test failures (#1425)
Browse files Browse the repository at this point in the history
(cherry picked from commit 1dbe6de)
  • Loading branch information
prestonvasquez authored and blink1073 committed Oct 19, 2023
1 parent 86d6fb7 commit 4a9fa00
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 4a9fa00

Please sign in to comment.