Skip to content

Commit 686e6f4

Browse files
committed
Minor tweaks
1 parent 2e67a42 commit 686e6f4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

modules/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageService.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ private Storage createClient(GoogleCloudStorageClientSettings gcsClientSettings,
179179
}
180180
return existing;
181181
}))
182+
.disableCookieManagement()
182183
.setConnectionManagerShared(true)
183184
// ApacheHttpTransport indicates to disable redirect and retries
184185
.disableRedirectHandling()
@@ -187,12 +188,11 @@ private Storage createClient(GoogleCloudStorageClientSettings gcsClientSettings,
187188
return new ApacheHttpTransport(builder.build());
188189
});
189190

190-
final HttpTransportOptions httpTransportOptions = new HttpTransportOptions(
191-
HttpTransportOptions.newBuilder()
192-
.setConnectTimeout(toTimeout(gcsClientSettings.getConnectTimeout()))
193-
.setReadTimeout(toTimeout(gcsClientSettings.getReadTimeout()))
194-
.setHttpTransportFactory(() -> httpTransport)
195-
);
191+
final HttpTransportOptions httpTransportOptions = HttpTransportOptions.newBuilder()
192+
.setConnectTimeout(toTimeout(gcsClientSettings.getConnectTimeout()))
193+
.setReadTimeout(toTimeout(gcsClientSettings.getReadTimeout()))
194+
.setHttpTransportFactory(() -> httpTransport)
195+
.build();
196196
final StorageOptions storageOptions = createStorageOptions(gcsClientSettings, httpTransportOptions);
197197
return storageOptions.getService();
198198
}

0 commit comments

Comments
 (0)