Skip to content

Commit

Permalink
Merge branch 'task/increase-api-timeout' into beta-2.10.7
Browse files Browse the repository at this point in the history
  • Loading branch information
jurajhilje committed Feb 1, 2024
2 parents 6a97c1f + f2c1726 commit dc199c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class SessionController @Inject constructor(
}

private fun innerCreateSession(body: SessionNewRequestBody, keys: Keypair?) {
sessionNewRequest = Request(settings, clientFactory, serversRepository, Request.Duration.SHORT, RequestWrapper.IpMode.IPv4)
sessionNewRequest = Request(settings, clientFactory, serversRepository, Request.Duration.LONG, RequestWrapper.IpMode.IPv4)

sessionNewRequest?.start({ api: IVPNApi -> api.newSession(body) },
object : RequestListener<SessionNewResponse> {
Expand Down Expand Up @@ -183,7 +183,7 @@ class SessionController @Inject constructor(

val token = userPreference.getSessionToken()
val requestBody = DeleteSessionRequestBody(token)
deleteSessionRequest = Request(settings, clientFactory, serversRepository, Request.Duration.SHORT, RequestWrapper.IpMode.IPv4)
deleteSessionRequest = Request(settings, clientFactory, serversRepository, Request.Duration.LONG, RequestWrapper.IpMode.IPv4)

deleteSessionRequest?.start({ api: IVPNApi -> api.deleteSession(requestBody) },
object : RequestListener<DeleteSessionResponse?> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class Request<T> {

public Request(Settings settings, HttpClientFactory httpClientFactory, ServersRepository serversRepository,
Duration duration, RequestWrapper.IpMode mode) {
int timeOut = duration == Duration.SHORT ? 10 : 30;
int timeOut = duration == Duration.SHORT ? 15 : 45;
requestWrapper = new RequestWrapper<T>(settings, httpClientFactory, serversRepository, timeOut, mode);
}

Expand Down

0 comments on commit dc199c5

Please sign in to comment.