async def stop(self):
    self.stopping_soon = True
    if self.listen_server:
        self.listen_server.close()
    async with ignore_after(self.TIMEOUT_SHUTDOWN_FAIL_PENDING_HTLCS):
        (await self.wait_for_received_pending_htlcs_to_get_removed())
    (await LNWorker.stop(self))
    if self.lnwatcher:
        (await self.lnwatcher.stop())
        self.lnwatcher = None
async def stop(self):
    self.stopping_soon = True
    if self.listen_server:
        self.listen_server.close()
    async with ignore_after(self.TIMEOUT_SHUTDOWN_FAIL_PENDING_HTLCS):
        (await self.wait_for_received_pending_htlcs_to_get_removed())
    (await LNWorker.stop(self))
    if self.lnwatcher:
        (await self.lnwatcher.stop())
        self.lnwatcher = None