Move immediate connection notification logic into Dispatcher.

This prevents a race condition that could result in out of order
notifications.
This commit is contained in:
Peter Johnson
2017-09-30 23:37:02 -07:00
parent e4a8bff70e
commit e68a71022c
6 changed files with 48 additions and 14 deletions

View File

@@ -57,9 +57,9 @@ class ConnectionNotifier
void Start();
unsigned int Add(
std::function<void(const ConnectionNotification& event)> callback);
unsigned int AddPolled(unsigned int poller_uid);
unsigned int Add(std::function<void(const ConnectionNotification& event)>
callback) override;
unsigned int AddPolled(unsigned int poller_uid) override;
void NotifyConnection(bool connected, const ConnectionInfo& conn_info,
unsigned int only_listener = UINT_MAX) override;