@@ -40,7 +40,7 @@ public final class HttpSplitChangeFetcher implements SplitChangeFetcher {
40
40
private static final String SETS = "sets" ;
41
41
private static final String SPEC = "s" ;
42
42
private String specVersion = SPEC_1_3 ;
43
- private int PROXY_CHECK_INTERVAL_MILLISECONDS_SS = 24 * 60 * 60 * 1000 ;
43
+ private int PROXY_CHECK_INTERVAL_MILLISECONDS_SS = 24 * 60 * 60 * 1000 ;
44
44
private Long _lastProxyCheckTimestamp = 0L ;
45
45
private final SplitHttpClient _client ;
46
46
private final URI _target ;
@@ -70,11 +70,13 @@ long makeRandomTill() {
70
70
public SplitChange fetch (long since , long sinceRBS , FetchOptions options ) {
71
71
long start = System .currentTimeMillis ();
72
72
try {
73
+ URI uri = buildURL (options , since , sinceRBS );
73
74
if (specVersion .equals (SPEC_1_1 ) && (System .currentTimeMillis () - _lastProxyCheckTimestamp >= PROXY_CHECK_INTERVAL_MILLISECONDS_SS )) {
74
75
_log .info ("Switching to new Feature flag spec ({}) and fetching." , SPEC_1_3 );
75
76
specVersion = SPEC_1_3 ;
77
+ uri = buildURL (options , -1 ,-1 );
76
78
}
77
- URI uri = buildURL ( options , since , sinceRBS );
79
+
78
80
SplitHttpResponse response = _client .get (uri , options , null );
79
81
if (response .statusCode () < HttpStatus .SC_OK || response .statusCode () >= HttpStatus .SC_MULTIPLE_CHOICES ) {
80
82
if (response .statusCode () == HttpStatus .SC_REQUEST_URI_TOO_LONG ) {
0 commit comments