forked from M-Labs/artiq
gui: fix RPC client teardown
This commit is contained in:
parent
8e24a018ea
commit
a2c074cc33
@ -67,14 +67,14 @@ def main():
|
||||
app = QtGui.QApplication([])
|
||||
loop = QEventLoop(app)
|
||||
asyncio.set_event_loop(loop)
|
||||
atexit.register(lambda: loop.close())
|
||||
atexit.register(loop.close)
|
||||
|
||||
rpc_clients = dict()
|
||||
for target in "schedule", "repository", "dataset_db":
|
||||
client = AsyncioClient()
|
||||
loop.run_until_complete(client.connect_rpc(
|
||||
args.server, args.port_control, "master_" + target))
|
||||
atexit.register(lambda: client.close_rpc())
|
||||
atexit.register(client.close_rpc)
|
||||
rpc_clients[target] = client
|
||||
|
||||
smgr = StateManager(args.db_file)
|
||||
|
Loading…
Reference in New Issue
Block a user