aboutsummaryrefslogtreecommitdiffstats
path: root/lib/prserv
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-08-24 12:03:10 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-08-26 10:38:43 +0100
commit8c01cff94787abbb64fbdf0c16cd63f8f97a7e03 (patch)
treedc6c2d5efed6f3693ff0ebcdcea2924553cb12ad /lib/prserv
parentc5c8f33ca4b81877a0115887849881001b745bf0 (diff)
downloadbitbake-8c01cff94787abbb64fbdf0c16cd63f8f97a7e03.tar.gz
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/prserv')
-rw-r--r--lib/prserv/serv.py3
1 files changed, 0 insertions, 3 deletions
diff --git a/lib/prserv/serv.py b/lib/prserv/serv.py
index b854686c1..81b4f8d06 100644
--- a/lib/prserv/serv.py
+++ b/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()