fix callbacks when switching to another server

This commit is contained in:
ThomasV 2017-06-22 14:47:05 +02:00
parent ca220d8dbb
commit 6931ffada5
1 changed files with 4 additions and 1 deletions

View File

@ -610,7 +610,10 @@ class Network(util.DaemonThread):
assert interface == self.interface
callbacks = [client_req[2]]
else:
callbacks = []
# fixme: will only work for subscriptions
k = self.get_index(method, params)
callbacks = self.subscriptions.get(k, [])
# Copy the request method and params to the response
response['method'] = method
response['params'] = params