fix: do not share the subscriptions object between relays
Change in one relay reflects in others. The RelayManager takes care of updating each relay individually.
This commit is contained in:
parent
629aa3a6c3
commit
6852a9aa5e
1 changed files with 1 additions and 1 deletions
|
|
@ -23,7 +23,7 @@ class RelayManager:
|
||||||
self, url: str, read: bool = True, write: bool = True, subscriptions={}
|
self, url: str, read: bool = True, write: bool = True, subscriptions={}
|
||||||
):
|
):
|
||||||
policy = RelayPolicy(read, write)
|
policy = RelayPolicy(read, write)
|
||||||
relay = Relay(url, policy, self.message_pool, subscriptions)
|
relay = Relay(url, policy, self.message_pool, subscriptions.copy())
|
||||||
self.relays[url] = relay
|
self.relays[url] = relay
|
||||||
|
|
||||||
def remove_relay(self, url: str):
|
def remove_relay(self, url: str):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue