I've tried many different ways of writing a simple HTTP server for Python (using IronPython in a hosted environment) and whenever there is an error (e.g. run-time error) the Python environment just hangs, rather than shutting down and reporting the error.
Update:
There is a comment on an answer to another SO question that suggest that calling "self.server.shutdown()" in a request handler also causes a Python web server to hang in Windows.
So possibly run-time exceptions lead to the same problem.