Skip to content

Commit

Permalink
Router: also allow filtering slow routers in exploratory, client tunnels
Browse files Browse the repository at this point in the history
  • Loading branch information
eyedeekay committed Jul 24, 2023
1 parent a6515a3 commit 82d5bc1
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -437,25 +437,27 @@ private boolean filterUnreachable(boolean isInbound, boolean isExploratory) {
private static final String PROP_INBOUND_EXPLORATORY_EXCLUDE_SLOW = "router.inboundExploratoryExcludeSlow";
private static final String PROP_INBOUND_CLIENT_EXCLUDE_SLOW = "router.inboundClientExcludeSlow";

private static final boolean DEFAULT_OUTBOUND_EXPLORATORY_EXCLUDE_SLOW = false;
private static final boolean DEFAULT_OUTBOUND_CLIENT_EXCLUDE_SLOW = true;
private static final boolean DEFAULT_INBOUND_EXPLORATORY_EXCLUDE_SLOW = false;
private static final boolean DEFAULT_INBOUND_CLIENT_EXCLUDE_SLOW = true;

/**
* do we want to skip peers that are slow?
* @return true unless configured otherwise
*/
protected boolean filterSlow(boolean isInbound, boolean isExploratory) {
return true;
/*
if (isExploratory) {
if (isInbound)
return ctx.getProperty(PROP_INBOUND_EXPLORATORY_EXCLUDE_SLOW, true);
return ctx.getProperty(PROP_INBOUND_EXPLORATORY_EXCLUDE_SLOW, DEFAULT_INBOUND_EXPLORATORY_EXCLUDE_SLOW);
else
return ctx.getProperty(PROP_OUTBOUND_EXPLORATORY_EXCLUDE_SLOW, true);
return ctx.getProperty(PROP_OUTBOUND_EXPLORATORY_EXCLUDE_SLOW, DEFAULT_OUTBOUND_EXPLORATORY_EXCLUDE_SLOW);
} else {
if (isInbound)
return ctx.getProperty(PROP_INBOUND_CLIENT_EXCLUDE_SLOW, true);
return ctx.getProperty(PROP_INBOUND_CLIENT_EXCLUDE_SLOW, DEFAULT_INBOUND_CLIENT_EXCLUDE_SLOW);
else
return ctx.getProperty(PROP_OUTBOUND_CLIENT_EXCLUDE_SLOW, true);
return ctx.getProperty(PROP_OUTBOUND_CLIENT_EXCLUDE_SLOW, DEFAULT_OUTBOUND_CLIENT_EXCLUDE_SLOW);
}
*/
}

/** see HashComparator */
Expand Down

0 comments on commit 82d5bc1

Please sign in to comment.