|
|
@ -225,7 +225,7 @@ void Host::doneWorking() |
|
|
|
m_sessions.clear(); |
|
|
|
} |
|
|
|
|
|
|
|
void Host::startPeerSession(Public const& _id, RLP const& _rlp, RLPXFrameCoder* _io, std::shared_ptr<RLPXSocket> const& _s) |
|
|
|
void Host::startPeerSession(Public const& _id, RLP const& _rlp, unique_ptr<RLPXFrameCoder>&& _io, std::shared_ptr<RLPXSocket> const& _s) |
|
|
|
{ |
|
|
|
// session maybe ingress or egress so m_peers and node table entries may not exist
|
|
|
|
shared_ptr<Peer> p; |
|
|
@ -264,7 +264,7 @@ void Host::startPeerSession(Public const& _id, RLP const& _rlp, RLPXFrameCoder* |
|
|
|
clog(NetMessageSummary) << "Hello: " << clientVersion << "V[" << protocolVersion << "]" << _id << showbase << capslog.str() << dec << listenPort; |
|
|
|
|
|
|
|
// create session so disconnects are managed
|
|
|
|
auto ps = make_shared<Session>(this, _io, _s, p, PeerSessionInfo({_id, clientVersion, p->endpoint.address.to_string(), listenPort, chrono::steady_clock::duration(), _rlp[2].toSet<CapDesc>(), 0, map<string, string>(), protocolVersion})); |
|
|
|
auto ps = make_shared<Session>(this, move(_io), _s, p, PeerSessionInfo({_id, clientVersion, p->endpoint.address.to_string(), listenPort, chrono::steady_clock::duration(), _rlp[2].toSet<CapDesc>(), 0, map<string, string>(), protocolVersion})); |
|
|
|
if (protocolVersion < dev::p2p::c_protocolVersion - 1) |
|
|
|
{ |
|
|
|
ps->disconnect(IncompatibleProtocol); |
|
|
|