Skip to content

Commit

Permalink
- slightly increase network timeout values to stabilize weak connecti…
Browse files Browse the repository at this point in the history
…ons.
  • Loading branch information
derreisende77 committed Aug 1, 2024
1 parent 87fad88 commit bb15b26
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
- **FEATURE:** Dialog "Filminformation" kann nun vollständig vergrößert oder verkleinert werden.
- **FEATURE:** Die Filter werden nun über einen eigenen Button umbenannt und nicht mehr durch Eingabe in der ComboBox.
- **FEATURE:** Bei der Lucene-Suche dürfen Wildcards nun auch am Anfang des Suchtexts verwendet werden.
- Network Timeout wurde auf 10 Sekunden erhöht. Dies sollte bei schlechten Netzwerkverbindungen etwas Abhilfe schaffen.


# **14.0.0**
Expand Down
9 changes: 6 additions & 3 deletions src/main/java/mediathek/tool/http/MVHttpClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,19 @@ private OkHttpClient.Builder getDefaultClientBuilder() {
builder.connectionSpecs(Arrays.asList(ConnectionSpec.MODERN_TLS, ConnectionSpec.COMPATIBLE_TLS));
}

builder.connectTimeout(5, TimeUnit.SECONDS)
.writeTimeout(5, TimeUnit.SECONDS)
.readTimeout(2, TimeUnit.SECONDS)
builder.connectTimeout(NETWORK_TIMEOUT, TimeUnit.SECONDS)
.writeTimeout(NETWORK_TIMEOUT, TimeUnit.SECONDS)
.readTimeout(NETWORK_TIMEOUT, TimeUnit.SECONDS)
.socketFactory(byteCounter.socketFactory())
.followRedirects(true)
.followSslRedirects(true)
.dns(dnsSelector);
return builder;
}

//TODO make configurable network timeout
private static final long NETWORK_TIMEOUT = 10;

public ByteCounter getByteCounter() {
return byteCounter;
}
Expand Down

0 comments on commit bb15b26

Please sign in to comment.