From 6fcb8b0574a8b5b154751d7314215aa50d055dcb Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Sat, 10 Dec 2016 09:07:08 +0900 Subject: [PATCH] Fix cut-n-pasteo --- docs/ENV-NOTES | 3 ++- server/protocol.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/ENV-NOTES b/docs/ENV-NOTES index 58baf97..9861671 100644 --- a/docs/ENV-NOTES +++ b/docs/ENV-NOTES @@ -26,7 +26,8 @@ REORG_LIMIT - maximum number of blocks to be able to handle in a chain undo information for this many blocks in levelDB. Default is 200. HOST - the host that the TCP and SSL servers will use. Defaults to - localhost. + localhost. Set to blank to listen on all addresses (IPv4 + and IPv6). TCP_PORT - if set will serve Electrum TCP clients on that HOST:TCP_PORT SSL_PORT - if set will serve Electrum SSL clients on that HOST:SSL_PORT If set, SSL_CERTFILE and SSL_KEYFILE must be filesystem paths. diff --git a/server/protocol.py b/server/protocol.py index 61766a4..dd6c855 100644 --- a/server/protocol.py +++ b/server/protocol.py @@ -11,6 +11,7 @@ import asyncio import codecs import json +import socket import ssl import time import traceback @@ -514,7 +515,7 @@ class ServerManager(util.LoggedClass): if session.is_closing(): if session.stop <= shutdown_cutoff and session.socket: # Should trigger a call to connection_lost very soon - self.socket.shutdown(socket.SHUT_RDWR) + session.socket.shutdown(socket.SHUT_RDWR) else: if session.last_recv < stale_cutoff: self.close_session(session)