Skip to content

Commit

Permalink
fixup! pyln: Add notifications support to LightningRpc
Browse files Browse the repository at this point in the history
  • Loading branch information
cdecker committed Jan 5, 2021
1 parent ed79948 commit 59d3a5c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions contrib/pyln-client/pyln/client/lightning.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,9 @@ def call(self, method, payload=None):
while True:
resp, buf = self._readobj(sock, buf)
id = resp.get("id", None)
method = resp.get("method", None)
meth = resp.get("method", None)

if method == 'message' and self._notify is not None:
if meth == 'message' and self._notify is not None:
n = resp['params']
self._notify(
message=n.get('message', None),
Expand All @@ -366,7 +366,7 @@ def call(self, method, payload=None):
)
continue

if method is None or id is None:
if meth is None or id is None:
break

self.logger.debug("Received response for %s call: %r", method, resp)
Expand Down

0 comments on commit 59d3a5c

Please sign in to comment.