diff --git a/libethereum/EthereumPeer.cpp b/libethereum/EthereumPeer.cpp index a6211505f..f318a1757 100644 --- a/libethereum/EthereumPeer.cpp +++ b/libethereum/EthereumPeer.cpp @@ -48,6 +48,7 @@ EthereumPeer::EthereumPeer(Session* _s, HostCapabilityFace* _h, unsigned _i): EthereumPeer::~EthereumPeer() { + clogS(NetMessageSummary) << "Aborting Sync :-("; abortSync(); } diff --git a/libp2p/Host.cpp b/libp2p/Host.cpp index 78a8232fd..789418893 100644 --- a/libp2p/Host.cpp +++ b/libp2p/Host.cpp @@ -42,6 +42,12 @@ using namespace std; using namespace dev; using namespace dev::p2p; +/// Interval at which Host::run will call keepAlivePeers to ping peers. +std::chrono::seconds const c_keepAliveInterval = std::chrono::seconds(30); + +/// Disconnect timeout after failure to respond to keepAlivePeers ping. +std::chrono::milliseconds const c_keepAliveTimeOut = std::chrono::milliseconds(1000); + HostNodeTableHandler::HostNodeTableHandler(Host& _host): m_host(_host) {} void HostNodeTableHandler::processEvent(NodeId const& _n, NodeTableEventType const& _e) diff --git a/libp2p/Host.h b/libp2p/Host.h index ff27807a7..50abad2af 100644 --- a/libp2p/Host.h +++ b/libp2p/Host.h @@ -94,12 +94,6 @@ public: /// Will block on network process events. virtual ~Host(); - /// Interval at which Host::run will call keepAlivePeers to ping peers. - std::chrono::seconds const c_keepAliveInterval = std::chrono::seconds(30); - - /// Disconnect timeout after failure to respond to keepAlivePeers ping. - std::chrono::milliseconds const c_keepAliveTimeOut = std::chrono::milliseconds(1000); - /// Default host for current version of client. static std::string pocHost(); diff --git a/libp2p/Session.cpp b/libp2p/Session.cpp index 2c6530a2d..d7bfca34e 100644 --- a/libp2p/Session.cpp +++ b/libp2p/Session.cpp @@ -51,6 +51,7 @@ Session::Session(Host* _s, RLPXFrameIO* _io, std::shared_ptr const& _n, Pe Session::~Session() { + clogS(NetMessageSummary) << "Closing Peer Session :-("; m_peer->m_lastConnected = m_peer->m_lastAttempted - chrono::seconds(1); // Read-chain finished for one reason or another.