Actually connect the connection before returning it

This commit is contained in:
Kovid Goyal 2020-12-06 13:15:31 +05:30
parent c8b70c30b9
commit 8d22053bed
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -120,7 +120,9 @@ class TestServer(Thread):
timeout = self.loop.opts.timeout
if interface is None:
interface = self.address[0]
return http_client.HTTPConnection(interface, self.address[1], timeout=timeout)
ans = http_client.HTTPConnection(interface, self.address[1], timeout=timeout)
ans.connect()
return ans
def change_handler(self, handler):
from calibre.srv.http_response import create_http_handler