diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-08-24 12:03:10 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-08-26 11:29:46 +0100 |
commit | bfab986ccd59636d0b0e79309f020e55481b0567 (patch) | |
tree | 5db43a018da4cb21c9687d4a4c7fc8d8245ad5e4 /bitbake/lib/prserv | |
parent | a03a423c607f53684789ebb5c3c5003568047a14 (diff) | |
download | poky-bfab986ccd59636d0b0e79309f020e55481b0567.tar.gz |
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 <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/prserv')
-rw-r--r-- | bitbake/lib/prserv/serv.py | 3 |
1 files changed, 0 insertions, 3 deletions
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(): | |||
186 | self.connection, self.transport = bb.server.xmlrpc._create_server(self.host, self.port) | 186 | self.connection, self.transport = bb.server.xmlrpc._create_server(self.host, self.port) |
187 | 187 | ||
188 | def terminate(self): | 188 | def terminate(self): |
189 | # Don't wait for server indefinitely | ||
190 | import socket | ||
191 | socket.setdefaulttimeout(2) | ||
192 | try: | 189 | try: |
193 | logger.info("Terminating PRServer...") | 190 | logger.info("Terminating PRServer...") |
194 | self.connection.quit() | 191 | self.connection.quit() |