Skip to content

Commit

Permalink
GODRIVER-3013 [master] Resolve race test failures (#1434)
Browse files Browse the repository at this point in the history
Co-authored-by: Preston Vasquez <[email protected]>
  • Loading branch information
blink1073 and prestonvasquez authored Oct 19, 2023
1 parent 86d6fb7 commit b436f93
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 b436f93

Please sign in to comment.