Skip to content

Commit

Permalink
Merge pull request #44 from w3c/jgraham/daemon_threads
Browse files Browse the repository at this point in the history
Make request handling threads daemonic
  • Loading branch information
andreastt committed Aug 13, 2014
2 parents ec9b10b + 20c1b1d commit 4854522
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions wptserve/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ class WebTestServer(ThreadingMixIn, BaseHTTPServer.HTTPServer):
allow_reuse_address = True
acceptable_errors = (errno.EPIPE, errno.ECONNABORTED)

# Ensure that we don't hang on shutdown waiting for requests
daemon_threads = True

def __init__(self, server_address, RequestHandlerClass, router, rewriter, bind_hostname, config=None,
use_ssl=False, certificate=None, **kwargs):
"""Server for HTTP(s) Requests
Expand Down

0 comments on commit 4854522

Please sign in to comment.