From bfab986ccd59636d0b0e79309f020e55481b0567 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sat, 24 Aug 2013 12:03:10 +0000 Subject: bitbake: server/xmlrpc/prserv: Add sane timeout to default xmlrpc server The standard python socket connect has long timouts which make sense for remote connections but not local things like the PR Service. This adds a timeout parameter to the common xmlrpc server creation function and sets it to a more reasonable 5 seconds. Making the PR server instantly exit is a good way to test the effect of this on bitbake. We can remove the bodged timeout in the PRServer terminate function which has the side effect of affecting global scope. (Bitbake rev: 8c01cff94787abbb64fbdf0c16cd63f8f97a7e03) Signed-off-by: Richard Purdie --- bitbake/lib/prserv/serv.py | 3 --- 1 file changed, 3 deletions(-) (limited to 'bitbake/lib/prserv') diff --git a/bitbake/lib/prserv/serv.py b/bitbake/lib/prserv/serv.py index b854686c1a..81b4f8d069 100644 --- a/bitbake/lib/prserv/serv.py +++ b/bitbake/lib/prserv/serv.py @@ -186,9 +186,6 @@ class PRServerConnection(): self.connection, self.transport = bb.server.xmlrpc._create_server(self.host, self.port) def terminate(self): - # Don't wait for server indefinitely - import socket - socket.setdefaulttimeout(2) try: logger.info("Terminating PRServer...") self.connection.quit() -- cgit v1.2.3-54-g00ecf