Skip to content

Commit

Permalink
feat(api): bump readTimeout to 1 minute (#264)
Browse files Browse the repository at this point in the history
10 seconds aren't always enough in some circumstances
  • Loading branch information
drymarau authored Nov 30, 2023
1 parent 8ba1a76 commit 8907e63
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import kotlinx.serialization.modules.SerializersModule
import okhttp3.OkHttpClient
import java.net.URL
import java.util.UUID
import java.util.concurrent.TimeUnit

/**
* A fluent client for Infinity REST API v2.
Expand Down Expand Up @@ -726,7 +727,11 @@ public interface InfinityService {
json = Json,
)

internal fun create(client: OkHttpClient, json: Json): InfinityService =
InfinityServiceImpl(client, json)
internal fun create(client: OkHttpClient, json: Json) = InfinityServiceImpl(
client = client.newBuilder()
.readTimeout(1, TimeUnit.MINUTES)
.build(),
json = json,
)
}
}

0 comments on commit 8907e63

Please sign in to comment.