Browse Source

cleanup

cl-refactor
subtly 10 years ago
parent
commit
ce92f4dc72
  1. 3
      libp2p/Host.cpp
  2. 6
      libp2p/Host.h

3
libp2p/Host.cpp

@ -355,8 +355,7 @@ void Host::runAcceptor()
} }
} }
if (!success) if (!success && m_socket->is_open())
if (m_socket->is_open())
{ {
boost::system::error_code ec; boost::system::error_code ec;
m_socket->shutdown(boost::asio::ip::tcp::socket::shutdown_both, ec); m_socket->shutdown(boost::asio::ip::tcp::socket::shutdown_both, ec);

6
libp2p/Host.h

@ -194,13 +194,13 @@ private:
/// Called by Worker. Not thread-safe; to be called only by worker. /// Called by Worker. Not thread-safe; to be called only by worker.
virtual void startedWorking(); virtual void startedWorking();
/// Called by startedWorking. Not thread-safe; to be called only be worker callback. /// Called by startedWorking. Not thread-safe; to be called only be Worker.
void run(boost::system::error_code const& error); ///< Run network. Called serially via ASIO deadline timer. Manages connection state transitions. void run(boost::system::error_code const& error); ///< Run network. Called serially via ASIO deadline timer. Manages connection state transitions.
/// Run network. Called by Worker. Not thread-safe; to be called only by worker. /// Run network. Not thread-safe; to be called only by worker.
virtual void doWork(); virtual void doWork();
/// Shutdown network. Called by Worker. Not thread-safe; to be called only by worker. /// Shutdown network. Not thread-safe; to be called only by worker.
virtual void doneWorking(); virtual void doneWorking();
std::shared_ptr<Node> noteNode(NodeId _id, bi::tcp::endpoint _a, Origin _o, bool _ready, NodeId _oldId = NodeId()); std::shared_ptr<Node> noteNode(NodeId _id, bi::tcp::endpoint _a, Origin _o, bool _ready, NodeId _oldId = NodeId());

Loading…
Cancel
Save