Handle quick shutdown with polling better.

Closes #749

@matthewrmshin - please review.