Skip to content

Commit 0c292b7

Browse files
committed
GH-1092 Simplify if
1 parent 77198f2 commit 0c292b7

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

plugins/net_plugin/net_plugin.cpp

+1-4
Original file line numberDiff line numberDiff line change
@@ -3336,10 +3336,7 @@ namespace eosio {
33363336
fc::unique_lock g_check_conn( check->conn_mtx );
33373337
fc_dlog( logger, "dup check: connected ${c}, ${l} =? ${r}",
33383338
("c", check->connected())("l", check->last_handshake_recv.node_id)("r", msg.node_id) );
3339-
if(check->connected() && check->last_handshake_recv.node_id == msg.node_id) {
3340-
return true;
3341-
}
3342-
return false;
3339+
return check->connected() && check->last_handshake_recv.node_id == msg.node_id;
33433340
};
33443341
if (my_impl->connections.any_of_connections(std::move(is_duplicate))) {
33453342
peer_dlog( this, "sending go_away duplicate, msg.p2p_address: ${add}", ("add", msg.p2p_address) );

0 commit comments

Comments
 (0)