File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,8 @@ public class SockIOPool {
132132 public static final int OLD_COMPAT_HASH = 1 ; // original compatibility hashing algorithm (works with other clients)
133133 public static final int NEW_COMPAT_HASH = 2 ; // new CRC32 based compatibility hashing algorithm (works with other clients)
134134
135+ public static final long MAX_RETRY_DELAY = 10 * 60 * 1000 ; // max of 10 minute delay for fall off
136+
135137 // Pool data
136138 private MaintThread maintThread ;
137139 private boolean initialized = false ;
@@ -625,7 +627,12 @@ protected SockIO createSocket( String host ) {
625627 if ( socket == null ) {
626628 Date now = new Date ();
627629 hostDead .put ( host , now );
630+
628631 long expire = ( hostDeadDur .containsKey ( host ) ) ? (((Long )hostDeadDur .get ( host )).longValue () * 2 ) : 1000 ;
632+
633+ if ( expire > MAX_RETRY_DELAY )
634+ expire = MAX_RETRY_DELAY ;
635+
629636 hostDeadDur .put ( host , new Long ( expire ) );
630637 log .debug ( "++++ ignoring dead host: " + host + " for " + expire + " ms" );
631638
You can’t perform that action at this time.
0 commit comments