KeyboardInterrupt on Windows needs 30 seconds #6

Cito opened this Issue Nov 19, 2012 · 0 comments


None yet

2 participants

Cito commented Nov 19, 2012

If you press Ctrl-C under Windows to shut down a running waitress server, it will be only shut down after 30 seconds. This can be somewhat irritating and annoying. The problem can be solved by passing timeout=1 to the asyncore() call in the method. The default timeout is 30 seconds and it seems a KeyboardInterrupt is only thrown on Windows after that timeout. Setting it to a lower value of 1s should not have any negative implications. The timeout could at least be made a tunable parameter.

@mcdonc mcdonc added a commit that closed this issue Jan 10, 2013
@mcdonc mcdonc - Add an ``asyncore_loop_timeout`` adjustment value, which controls the
  ``timeout`` value passed to ``asyncore.loop``; defaults to 1.

- The default asyncore loop timeout is now 1 second.  This prevents slow
  shutdown on Windows.  See #6 .  This
  shouldn't matter to anyone in particular, but it can be changed via the
  ``asyncore_loop_timeout`` adjustment (it used to previously default to 30

Closes #6.
@mcdonc mcdonc closed this in 47d1ff8 Jan 10, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment