]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
xmlrpc: fix bug in setting XMLRPCServer.single_use
authorEd Bartosh <ed.bartosh@linux.intel.com>
Wed, 9 Mar 2016 08:07:40 +0000 (10:07 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 9 Mar 2016 22:38:20 +0000 (22:38 +0000)
XMLRPCServer.single_use attribute was always set to False.
This caused xmlrpc server to keep running after build is done as
BitBakeServerCommands.removeClient only shuts down server if its
single_use attribute is set to True.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/server/xmlrpc.py

index 1ceca51e0ae0aae8b38541934bc1ba5e7f428c1e..7528138740f9d86c496ac0f253ecbb44d7c2f25c 100644 (file)
@@ -191,8 +191,7 @@ class XMLRPCServer(SimpleXMLRPCServer, BaseImplServer):
         Constructor
         """
         BaseImplServer.__init__(self)
-        if (interface[1] == 0):     # anonymous port, not getting reused
-            self.single_use = True
+        self.single_use = interface[1] == 0 # anonymous port, not getting reused
         # Use auto port configuration
         if (interface[1] == -1):
             interface = (interface[0], 0)
@@ -205,7 +204,6 @@ class XMLRPCServer(SimpleXMLRPCServer, BaseImplServer):
         self.commands = BitBakeServerCommands(self)
         self.autoregister_all_functions(self.commands, "")
         self.interface = interface
-        self.single_use = False
 
     def addcooker(self, cooker):
         BaseImplServer.addcooker(self, cooker)