migrate to trio so c-lightning sockets stop hanging.

This commit is contained in:
fiatjaf
2020-10-04 12:06:20 -03:00
parent e74cf33f90
commit 9994e61615
15 changed files with 185 additions and 79 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
import asyncio
import trio # type: ignore
from os import getenv
from typing import Optional, Dict, AsyncGenerator
from requests import get, post
@@ -68,5 +68,5 @@ class LNbitsWallet(Wallet):
async def paid_invoices_stream(self) -> AsyncGenerator[str, None]:
print("lnbits does not support paid invoices stream yet")
await asyncio.sleep(5)
await trio.sleep(5)
yield ""