gui: proper shutdown of RPC client

This commit is contained in:
Sebastien Bourdeauducq 2015-01-06 17:50:15 +08:00
parent 1354ccbbc1
commit fa441eebda
1 changed files with 1 additions and 0 deletions

View File

@ -37,6 +37,7 @@ def main():
schedule_ctl = AsyncioClient()
loop.run_until_complete(schedule_ctl.connect_rpc(
args.server, args.port_control, "master_schedule"))
atexit.register(lambda: schedule_ctl.close_rpc())
scheduler_win = SchedulerWindow(schedule_ctl)
scheduler_win.connect("delete-event", Gtk.main_quit)