fix bug in test__greenness.py

server used to go into non-yielding infinite loop if listening socket was closed,
which made the whole thing to timeout
This commit is contained in:
Denis Bilenko
2009-06-15 12:14:32 +07:00
parent 23bf5cbd3d
commit 3848852b54

View File

@@ -38,9 +38,8 @@ def start_http_server():
#print "Serving HTTP on", sa[0], "port", sa[1], "..."
httpd.request_count = 0
def serve():
while 1:
httpd.handle_request()
httpd.request_count += 1
httpd.handle_request()
httpd.request_count += 1
return spawn(serve), httpd
class TestGreenness(unittest.TestCase):