]> git.ipfire.org Git - thirdparty/tornado.git/commit
Return HTTPServer in Application.listen 1558/head
authorMaarten Breddels <maartenbreddels@gmail.com>
Mon, 19 Oct 2015 15:24:55 +0000 (17:24 +0200)
committerMaarten Breddels <maartenbreddels@gmail.com>
Mon, 19 Oct 2015 15:24:55 +0000 (17:24 +0200)
commitb5d6734893d3c8bcf1a4516bf1f98e2415a62a15
tree724fa127b847cc64f1a8e5937c0c48e79f9d41f9
parent2c543d276dba89c37a07c2295cd8c7f0f7ab1562
Return HTTPServer in Application.listen

For unittesting I start and stop the server in setUp and tearDown. If I use Application.listen I don't have a reference to the HTTPServer and cannot close the socket. Binding it to the same address the next time will result in a address in use error. If the server is returned, calling close on it will allow the address/port to be reused.
tornado/web.py