A working discovery/poll loop.