aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/server
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2015-03-06 14:47:28 +0000
committerAlexandru DAMIAN <alexandru.damian@intel.com>2015-03-09 13:15:20 +0000
commit4e4a2ee2f05f8741b2e09263e328420363975b02 (patch)
tree3e99d6aeecc42f42fbfa68bb4ae05ac00f398376 /lib/bb/server
parent8fda1b66e695ccdf98ae1c34a0bd655be2878188 (diff)
downloadbitbake-contrib-4e4a2ee2f05f8741b2e09263e328420363975b02.tar.gz
xmlrpcserver: do not connect client on error
We roll back the client connection if some error happens, like during setFeatures, as to leave the server accessible to other clients. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Diffstat (limited to 'lib/bb/server')
-rw-r--r--lib/bb/server/xmlrpc.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/bb/server/xmlrpc.py b/lib/bb/server/xmlrpc.py
index 4205a4c35..afe3dfe5d 100644
--- a/lib/bb/server/xmlrpc.py
+++ b/lib/bb/server/xmlrpc.py
@@ -299,6 +299,8 @@ class BitBakeXMLRPCServerConnection(BitBakeBaseServerConnection):
_, error = self.connection.runCommand(["setFeatures", self.featureset])
if error:
+ # disconnect the client, we can't make the setFeature work
+ self.connection.removeClient()
# no need to log it here, the error shall be sent to the client
raise BaseException(error)