Skip to content

Commit

Permalink
Fixes Issue #7739 - Next hop strategy with bad 'to' URL causes TS cra…
Browse files Browse the repository at this point in the history
…sh. (#7749)
  • Loading branch information
jrushford authored Apr 28, 2021
1 parent 1b5139d commit ea305b2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion proxy/http/remap/NextHopConsistentHash.cc
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,10 @@ NextHopConsistentHash::findNextHop(TSHttpTxn txnp, void *ih, time_t now)
}
switch (ring_mode) {
case NH_ALTERNATE_RING:
if (groups > 0) {
if (pRec && groups > 0) {
cur_ring = (pRec->group_index + 1) % groups;
} else {
cur_ring = 0;
}
break;
case NH_EXHAUST_RING:
Expand Down

0 comments on commit ea305b2

Please sign in to comment.