Preventing deadlock in SessionLogger.