From 051fb69b7e1bd321e4c780e35f92ea93828b520f Mon Sep 17 00:00:00 2001 From: Determinant Date: Mon, 24 Jun 2019 17:09:13 -0400 Subject: ... --- include/salticidae/network.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include') 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::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); -- cgit v1.2.3