run-dev: Don't leak servers when we fail to bind to the proxy port

(imported from commit da7cd1f62f3d073bdae6fe72e71f4127931f4d57)
This commit is contained in:
Keegan McAllister 2012-11-14 13:43:27 -05:00
parent 5344c9dcc5
commit 5d8b66bf33
1 changed files with 1 additions and 2 deletions

View File

@ -58,9 +58,8 @@ class Resource(resource.Resource):
return proxy.ReverseProxyResource('localhost', django_port, '/'+name)
reactor.listenTCP(proxy_port, server.Site(Resource()), interface='127.0.0.1')
try:
reactor.listenTCP(proxy_port, server.Site(Resource()), interface='127.0.0.1')
reactor.run()
finally:
# Kill everything in our process group.