diff options
Diffstat (limited to 'cpp/src/qpid/sys/windows/IocpPoller.cpp')
| -rwxr-xr-x | cpp/src/qpid/sys/windows/IocpPoller.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/cpp/src/qpid/sys/windows/IocpPoller.cpp b/cpp/src/qpid/sys/windows/IocpPoller.cpp index 1e24adfb46..3760c26c00 100755 --- a/cpp/src/qpid/sys/windows/IocpPoller.cpp +++ b/cpp/src/qpid/sys/windows/IocpPoller.cpp @@ -105,9 +105,21 @@ bool Poller::interrupt(PollerHandle&) { } void Poller::run() { - Poller::shared_ptr p(this); - qpid::sys::Dispatcher d(p); - d.run(); + do { + Poller::Event event = this->wait(); + + // Handle shutdown + switch (event.type) { + case Poller::SHUTDOWN: + return; + break; + case Poller::INVALID: // On any type of success or fail completion + break; + default: + // This should be impossible + assert(false); + } + } while (true); } void Poller::addFd(PollerHandle& handle, Direction dir) { |
