mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-25 03:08:27 +08:00
aqctl_moninj_proxy: clear listeners on disconnect
This commit is contained in:
parent
7aa6104872
commit
c7394802bd
@ -116,6 +116,9 @@ class MonitorMux:
|
||||
else:
|
||||
raise ValueError
|
||||
|
||||
def disconnect_cb(self):
|
||||
self.listeners.clear()
|
||||
|
||||
|
||||
class ProxyConnection:
|
||||
def __init__(self, monitor_mux, reader, writer):
|
||||
@ -203,7 +206,9 @@ def main():
|
||||
signal_handler.setup()
|
||||
try:
|
||||
monitor_mux = MonitorMux()
|
||||
comm_moninj = CommMonInj(monitor_mux.monitor_cb, monitor_mux.injection_status_cb)
|
||||
comm_moninj = CommMonInj(monitor_mux.monitor_cb,
|
||||
monitor_mux.injection_status_cb,
|
||||
monitor_mux.disconnect_cb)
|
||||
monitor_mux.comm_moninj = comm_moninj
|
||||
loop.run_until_complete(comm_moninj.connect(args.core_addr))
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user