Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iss 1767 #1768

Merged
merged 3 commits into from
Sep 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

### 4.5-SNAPSHOT
#### Bugs
* Fix #1767: Removed fixed override for Okhttp client's `pingInterval`

#### Improvements

#### Dependency Upgrade

#### New Feature

### 4.5.2 (14-09-2019)
#### Bugs
* Fix #1759: Portforwarding is broken

#### Improvements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public class Config {
public static final Long DEFAULT_SCALE_TIMEOUT = 10 * 60 * 1000L;
public static final int DEFAULT_LOGGING_INTERVAL = 20 * 1000;
public static final Long DEFAULT_WEBSOCKET_TIMEOUT = 5 * 1000L;
public static final Long DEFAULT_WEBSOCKET_PING_INTERVAL = 1 * 1000L;
public static final Long DEFAULT_WEBSOCKET_PING_INTERVAL = 30 * 1000L;

public static final Integer DEFAULT_MAX_CONCURRENT_REQUESTS = 64;
public static final Integer DEFAULT_MAX_CONCURRENT_REQUESTS_PER_HOST = 5;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ public WatchConnectionManager(final OkHttpClient client, final BaseOperation<T,
this.maxIntervalExponent = maxIntervalExponent;

this.clonedClient = client.newBuilder()
.pingInterval(30, TimeUnit.SECONDS)
.readTimeout(this.websocketTimeout, TimeUnit.MILLISECONDS)
.build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,13 @@ public void shouldBeUsedTokenSuppliedByProvider() throws Exception {
assertEquals("PROVIDER_TOKEN", config.getOauthToken());
}

@Test
public void shouldHonorDefaultWebsocketPingInterval() {
Config config = new ConfigBuilder().build();

assertEquals(30000L, config.getWebsocketPingInterval());
}

private void assertConfig(Config config) {
assertNotNull(config);
assertTrue(config.isTrustCerts());
Expand Down