diff options
author | Determinant <[email protected]> | 2019-06-24 17:09:13 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2019-06-24 17:09:13 -0400 |
commit | 051fb69b7e1bd321e4c780e35f92ea93828b520f (patch) | |
tree | b5f32b1bdeb2d6e3f8802f7165e8076cf82e665a | |
parent | d0cb90e3fdd1bcb943ecadff542edd4260bbae1c (diff) |
...
-rw-r--r-- | include/salticidae/network.h | 3 | ||||
-rw-r--r-- | src/conn.cpp | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/include/salticidae/network.h b/include/salticidae/network.h index 05f4b7b..7f0964d 100644 --- a/include/salticidae/network.h +++ b/include/salticidae/network.h @@ -638,9 +638,8 @@ bool PeerNetwork<O, _, __>::check_new_conn(const conn_t &conn, uint16_t port) { if (conn->peer_id.is_null()) { /* passive connections can eventually have ids after getting the port number in IP_BASED_PORT mode */ - assert(id_mode == IP_PORT_BASED); conn->peer_id.ip = conn->get_addr().ip; - conn->peer_id.port = port; + conn->peer_id.port = id_mode == IP_BASED ? 0: port; } const auto &id = conn->peer_id; auto it = id2peer.find(id); diff --git a/src/conn.cpp b/src/conn.cpp index 7f6408e..ab08399 100644 --- a/src/conn.cpp +++ b/src/conn.cpp @@ -47,7 +47,7 @@ ConnPool::Conn::operator std::string() const { case Conn::PASSIVE: s << "passive"; break; case Conn::DEAD: s << "dead"; break; } - s << " term=" << (is_terminated() ? "yes" : "no") << ">"; + s << ">"; return std::move(s); } @@ -406,7 +406,6 @@ ConnPool::conn_t ConnPool::_connect(const NetAddr &addr) { void ConnPool::del_conn(const conn_t &conn) { auto it = pool.find(conn->fd); - SALTICIDAE_LOG_INFO("%s %d\n", std::string(*conn).c_str()); assert(it != pool.end()); pool.erase(it); update_conn(conn, false); |