mirror of https://github.com/qTox/qTox.git
Browse Source
When a setting is set it locks the Settings mutex and emits a signal for that setting. If a slot is connected to that signal and lives on the same thread as Settings, it is executed immediately with the Settings mutex still locked. That slot can then lock a series of other mutexes. During this time another thread can lock a mutex and then try to read settings, which will cause a deadlock due to the opposite order of multiple mutex locking. By always emitting signals after unlocking the Settings mutex, we avoid holding the Settings mutex while executing slots. Fix #6218reviewable/pr6219/r4
2 changed files with 216 additions and 359 deletions
Loading…
Reference in new issue