diff options
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/server/process.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py index 3d9077fd07..fb96804e68 100644 --- a/bitbake/lib/bb/server/process.py +++ b/bitbake/lib/bb/server/process.py | |||
@@ -336,12 +336,16 @@ class ServerCommunicator(): | |||
336 | return | 336 | return |
337 | 337 | ||
338 | class BitBakeProcessServerConnection(object): | 338 | class BitBakeProcessServerConnection(object): |
339 | def __init__(self, ui_channel, recv, eq): | 339 | def __init__(self, ui_channel, recv, eq, sock): |
340 | self.connection = ServerCommunicator(ui_channel, recv) | 340 | self.connection = ServerCommunicator(ui_channel, recv) |
341 | self.events = eq | 341 | self.events = eq |
342 | # Save sock so it doesn't get gc'd for the life of our connection | ||
343 | self.socket_connection = sock | ||
342 | 344 | ||
343 | def terminate(self): | 345 | def terminate(self): |
344 | self.socket_connection.close() | 346 | self.socket_connection.close() |
347 | self.connection.connection.close() | ||
348 | self.connection.recv.close() | ||
345 | return | 349 | return |
346 | 350 | ||
347 | class BitBakeServer(object): | 351 | class BitBakeServer(object): |
@@ -413,12 +417,10 @@ def connectProcessServer(sockname, featureset): | |||
413 | 417 | ||
414 | sendfds(sock, [writefd, readfd1, writefd2]) | 418 | sendfds(sock, [writefd, readfd1, writefd2]) |
415 | 419 | ||
416 | server_connection = BitBakeProcessServerConnection(command_chan, command_chan_recv, eq) | 420 | server_connection = BitBakeProcessServerConnection(command_chan, command_chan_recv, eq, sock) |
417 | 421 | ||
418 | server_connection.connection.updateFeatureSet(featureset) | 422 | server_connection.connection.updateFeatureSet(featureset) |
419 | 423 | ||
420 | # Save sock so it doesn't get gc'd for the life of our connection | ||
421 | server_connection.socket_connection = sock | ||
422 | except: | 424 | except: |
423 | sock.close() | 425 | sock.close() |
424 | raise | 426 | raise |