You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
libstore: fix data race in getFileTransfer() singleton replacement
Multiple threads could simultaneously observe that the singleton
FileTransfer instance has quit and attempt to replace it without
synchronization. This caused undefined behavior as multiple threads
would write to the same static std::shared_ptr concurrently.
Fixed by adding a mutex to ensure only one thread can replace the
singleton instance, using double-checked locking pattern to minimize
performance impact.
0 commit comments