sgmoore
3 years ago
committed by
SomberNight
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
3 changed files with
6 additions and
6 deletions
-
electrum/daemon.py
-
electrum/interface.py
-
electrum/lnpeer.py
|
|
@ -82,9 +82,9 @@ def remove_lockfile(lockfile): |
|
|
|
|
|
|
|
def get_file_descriptor(config: SimpleConfig): |
|
|
|
'''Tries to create the lockfile, using O_EXCL to |
|
|
|
prevent races. If it succeeds it returns the FD. |
|
|
|
Otherwise try and connect to the server specified in the lockfile. |
|
|
|
If this succeeds, the server is returned. Otherwise remove the |
|
|
|
prevent races. If it succeeds, it returns the FD. |
|
|
|
Otherwise, try and connect to the server specified in the lockfile. |
|
|
|
If this succeeds, the server is returned. Otherwise, remove the |
|
|
|
lockfile and try again.''' |
|
|
|
lockfile = get_lockfile(config) |
|
|
|
while True: |
|
|
|
|
|
@ -547,7 +547,7 @@ class Interface(Logger): |
|
|
|
# workaround android bug |
|
|
|
cert = re.sub("([^\n])-----END CERTIFICATE-----","\\1\n-----END CERTIFICATE-----",cert) |
|
|
|
f.write(cert) |
|
|
|
# even though close flushes we can't fsync when closed. |
|
|
|
# even though close flushes, we can't fsync when closed. |
|
|
|
# and we must flush before fsyncing, cause flush flushes to OS buffer |
|
|
|
# fsync writes to OS buffer to disk |
|
|
|
f.flush() |
|
|
@ -688,7 +688,7 @@ class Interface(Logger): |
|
|
|
|
|
|
|
async def close(self, *, force_after: int = None): |
|
|
|
"""Closes the connection and waits for it to be closed. |
|
|
|
We try to flush buffered data to the wire, so this can take some time. |
|
|
|
We try to flush buffered data to the wire, which can take some time. |
|
|
|
""" |
|
|
|
if force_after is None: |
|
|
|
# We give up after a while and just abort the connection. |
|
|
|
|
|
@ -826,7 +826,7 @@ class Peer(Logger): |
|
|
|
) |
|
|
|
|
|
|
|
# note: we ignore payload['channel_flags'], which e.g. contains 'announce_channel'. |
|
|
|
# Notably if the remote sets 'announce_channel' to True, we will ignore that too, |
|
|
|
# Notably, if the remote sets 'announce_channel' to True, we will ignore that too, |
|
|
|
# but we will not play along with actually announcing the channel (so we keep it private). |
|
|
|
|
|
|
|
# -> accept channel |
|
|
|