From 8b0d66949e3d6de7921dfe945ce7f681c4599703 Mon Sep 17 00:00:00 2001 From: DylanAlloy Date: Tue, 19 Dec 2023 06:21:21 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(bug):=20NATS=20function=20ho?= =?UTF-8?q?oks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- magnet/ic/field.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/magnet/ic/field.py b/magnet/ic/field.py index 79ddbe3..8d087cb 100644 --- a/magnet/ic/field.py +++ b/magnet/ic/field.py @@ -24,7 +24,7 @@ async def on(self, frequency: str = 'default', stream: str = 'default'): except TimeoutError: _f('fatal', f'could not connect to {self.server}') async def off(self): - await self.js.unsubscribe() + await self.sub.unsubscribe() _f('warn', f'unsubscribed from {self.stream}') await self.nc.drain() _f('warn', f'disconnected from {self.server}') @@ -62,7 +62,7 @@ async def on(self, frequency: str = 'default', stream: str = 'default', cb=print except json.decoder.JSONDecodeError: _f('fatal','invalid JSON') async def off(self): - await self.js.unsubscribe() + await self.sub.unsubscribe() _f('warn', f'unsubscribed from {self.stream}') await self.nc.drain() _f('warn', f'disconnected from {self.server}') \ No newline at end of file