Browse Source

ElectrumX 1.4.3

Close connections more aggressively on shutdown

We need VERSION in its own file, unfortunately
Fixes #442
patch-2
Neil Booth 7 years ago
parent
commit
1a0eea25c3
  1. 6
      docs/changelog.rst
  2. 5
      server/controller.py
  3. 1
      server/peers.py
  4. 1
      server/version.py
  5. 6
      setup.py

6
docs/changelog.rst

@ -1,6 +1,11 @@
ChangeLog
=========
Version 1.4.3
-------------
* Fix `#442`_.
Version 1.4.2
-------------
@ -137,3 +142,4 @@ LKaFk4KkVpw9pYoUpbckQSKKgCVC4oj78b
.. _#287: https://github.com/kyuupichan/electrumx/issues/287
.. _#301: https://github.com/kyuupichan/electrumx/issues/301
.. _#302: https://github.com/kyuupichan/electrumx/issues/302
.. _#442: https://github.com/kyuupichan/electrumx/issues/442

5
server/controller.py

@ -28,6 +28,7 @@ from server.daemon import DaemonError
from server.mempool import MemPool
from server.peers import PeerManager
from server.session import LocalRPC, BAD_REQUEST, DAEMON_ERROR
from server.version import VERSION
class SessionGroup(object):
@ -48,7 +49,7 @@ class Controller(ServerBase):
CATCHING_UP, LISTENING, PAUSED, SHUTTING_DOWN = range(4)
PROTOCOL_MIN = '1.0'
PROTOCOL_MAX = '1.2'
VERSION = 'ElectrumX 1.4.2'
VERSION = VERSION
def __init__(self, env):
'''Initialize everything that doesn't require the event loop.'''
@ -140,7 +141,7 @@ class Controller(ServerBase):
# Close servers and sessions, and cancel all tasks
self.close_servers(list(self.servers.keys()))
for session in self.sessions:
self.close_session(session)
session.abort()
self.tasks.cancel_all()
# Wait for the above to take effect

1
server/peers.py

@ -491,6 +491,7 @@ class PeerManager(object):
await self.retry_peers()
finally:
for session in list(PeerSession.sessions):
session.abort()
await session.wait_closed()
def is_coin_onion_peer(self, peer):

1
server/version.py

@ -0,0 +1 @@
VERSION = 'ElectrumX 1.4.3'

6
setup.py

@ -1,10 +1,10 @@
import setuptools
from server.controller import Controller
from server.version import VERSION
setuptools.setup(
name='electrumx',
version=Controller.short_version(),
version=VERSION,
scripts=['electrumx_server.py', 'electrumx_rpc.py'],
python_requires='>=3.6',
# via environment variables, in which case I've tested with 15.0.4
@ -17,7 +17,7 @@ setuptools.setup(
author='Neil Booth',
author_email='kyuupichan@gmail.com',
license='MIT Licence',
url='https://github.com/kyuupichan/electrumx/',
url='https://github.com/kyuupichan/electrumx',
long_description='Server implementation for the Electrum wallet',
classifiers=[
'Development Status :: 5 - Production/Stable',

Loading…
Cancel
Save