outposts: fix error on outpost disconnect
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
be5a6c0310
commit
9a48c2fd9a
|
@ -65,8 +65,9 @@ class OutpostConsumer(AuthJsonConsumer):
|
||||||
def disconnect(self, close_code):
|
def disconnect(self, close_code):
|
||||||
if self.outpost and self.last_uid:
|
if self.outpost and self.last_uid:
|
||||||
state = OutpostState.for_instance_uid(self.outpost, self.last_uid)
|
state = OutpostState.for_instance_uid(self.outpost, self.last_uid)
|
||||||
state.channel_ids.remove(self.channel_name)
|
if self.channel_name in state.channel_ids:
|
||||||
state.save()
|
state.channel_ids.remove(self.channel_name)
|
||||||
|
state.save()
|
||||||
LOGGER.debug(
|
LOGGER.debug(
|
||||||
"removed outpost instance from cache",
|
"removed outpost instance from cache",
|
||||||
outpost=self.outpost,
|
outpost=self.outpost,
|
||||||
|
|
Reference in New Issue