URI: 
       tinterface: change close() implementation - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit b3ff173b4507e8325c65d607a4547320ba2c8798
   DIR parent 762082e13d7e9db7c1ca603a04d9dc1aebe8b0af
  HTML Author: SomberNight <somber.night@protonmail.com>
       Date:   Sun,  9 Dec 2018 20:02:00 +0100
       
       interface: change close() implementation
       
       was getting on lightning branch in some circumstances
       RecursionError: maximum recursion depth exceeded while calling a Python object
       
       Diffstat:
         M electrum/interface.py               |       6 ++++--
       
       1 file changed, 4 insertions(+), 2 deletions(-)
       ---
   DIR diff --git a/electrum/interface.py b/electrum/interface.py
       t@@ -247,7 +247,7 @@ class Interface(PrintError):
                return sslc
        
            def handle_disconnect(func):
       -        async def wrapper_func(self, *args, **kwargs):
       +        async def wrapper_func(self: 'Interface', *args, **kwargs):
                    try:
                        return await func(self, *args, **kwargs)
                    except GracefulDisconnect as e:
       t@@ -380,7 +380,9 @@ class Interface(PrintError):
                    await self.session.send_request('server.ping')
        
            async def close(self):
       -        await self.group.cancel_remaining()
       +        if self.session:
       +            await self.session.close()
       +        # monitor_connection will cancel tasks
        
            async def run_fetch_blocks(self):
                header_queue = asyncio.Queue()