Skip to content

Commit

Permalink
Fix possible deadlock during log setup
Browse files Browse the repository at this point in the history
The mutex is supposed to ensure the order of messages if threads are involved,
allow multiple locks from the same thread.
  • Loading branch information
TheOneRing committed Jun 1, 2023
1 parent 9eaa7d0 commit e6d0be9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions changelog/unreleased/10905
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Possible deadlock during log setup

If an error occured during the setup of the log file, it was possible that the client got deadlocked.

https://github.com/owncloud/client/pull/10905
2 changes: 1 addition & 1 deletion src/libsync/logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class OWNCLOUDSYNC_EXPORT Logger : public QObject
bool _doFileFlush = false;
bool _logDebug = false;
QScopedPointer<QTextStream> _logstream;
mutable QMutex _mutex;
mutable QRecursiveMutex _mutex;
QString _logDirectory;
bool _temporaryFolderLogDir = false;
QSet<QString> _logRules;
Expand Down

0 comments on commit e6d0be9

Please sign in to comment.