mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 07:34:24 +01:00
pylightning: Fix missing encode if first pass fails
Without this the RPC will fail to continue buffering if the response does not fit in the first read, and if we don't switch over to the non-compat mode. This was introduced by our mitigation of the UTF-8 misalignment, but I missed this path. Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
committed by
neil saitug
parent
998233efc0
commit
e79fbb6812
@@ -160,7 +160,7 @@ class UnixDomainSocketRpc(object):
|
||||
return objs, buff
|
||||
except ValueError:
|
||||
# Probably didn't read enough
|
||||
pass
|
||||
buff = buff.lstrip().encode("UTF-8")
|
||||
|
||||
def _readobj(self, sock, buff=b''):
|
||||
"""Read a JSON object, starting with buff; returns object and any buffer left over"""
|
||||
|
||||
Reference in New Issue
Block a user