Fix bug in relay subscriptions

This commit is contained in:
Mark Veidemanis 2019-03-23 11:39:28 +00:00
parent c850984a3b
commit 29424383de
1 changed files with 5 additions and 5 deletions

View File

@ -64,8 +64,8 @@ class Relay(Protocol):
self.sendErr("SUBSCRIBED") self.sendErr("SUBSCRIBED")
return return
self.subscriptions.append(i) self.subscriptions.append(i)
self.sendMsg({"type": "success"}) self.sendMsg({"type": "success"})
return return
def handleUnubscribe(self, lst): def handleUnubscribe(self, lst):
if not isinstance(lst, list): if not isinstance(lst, list):
@ -78,9 +78,9 @@ class Relay(Protocol):
if not i in self.subscriptions: if not i in self.subscriptions:
self.sendErr("NOTSUBSCRIBED") self.sendErr("NOTSUBSCRIBED")
return return
del self.subscriptions[i] del self.subscriptions[i]
self.sendMsg({"type": "success"}) self.sendMsg({"type": "success"})
return return
def handleHello(self, parsed): def handleHello(self, parsed):
if parsed["key"] in main.tokens.keys(): if parsed["key"] in main.tokens.keys():