mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-28 03:20:11 +01:00
fixed SF# 3522906: Unregistering handlers from SocketReactor
This commit is contained in:
@@ -76,6 +76,16 @@ void NotificationCenter::removeObserver(const AbstractObserver& observer)
|
||||
}
|
||||
|
||||
|
||||
bool NotificationCenter::hasObserver(const AbstractObserver& observer) const
|
||||
{
|
||||
Mutex::ScopedLock lock(_mutex);
|
||||
for (ObserverList::const_iterator it = _observers.begin(); it != _observers.end(); ++it)
|
||||
if (observer.equals(**it)) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void NotificationCenter::postNotification(Notification::Ptr pNotification)
|
||||
{
|
||||
poco_check_ptr (pNotification);
|
||||
|
||||
Reference in New Issue
Block a user