summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xapp.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/app.py b/app.py
index d006e6d..9a08fa3 100755
--- a/app.py
+++ b/app.py
@@ -277,7 +277,9 @@ if __name__ == '__main__':
WSGIServer(Application(), bindAddress = (sys.argv[1], int(sys.argv[2]))).run()
else:
from wsgiref.simple_server import make_server, WSGIServer
+ from SocketServer import ThreadingMixIn
+ class ThreadingWSGIServer(ThreadingMixIn, WSGIServer): pass
# enable IPv6
- WSGIServer.address_family |= 10
- httpd = make_server('', 8000, Application())
+ ThreadingWSGIServer.address_family |= 10
+ httpd = make_server('', 8000, Application(), server_class = ThreadingWSGIServer)
httpd.serve_forever()