Handle quick shutdown with polling better.
Merge pull request #757 from hjoliver/749-polling-quick-stop

Handle quick shutdown with polling better.