-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Description
The initialize and uninitialize methods in OpenSSLInitializer uses a construct like this:
if (++_rc == 1) { ... }
_rc is a Poco::AtomicCounter.
This is insufficient since you can easily get into a situation where both uninitialize and initialize is called at the same time from multiple threads. These methods should be protected by a mutex lock to ensure proper execution.
The workaround to keep a persistent instance of this object works of course, but that just avoids triggering the race condition.
Reactions are currently unavailable