Skip to content

Commit

Permalink
change timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
soaryong-stamper committed Apr 28, 2023
1 parent 0a36d5a commit 0e6b85d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ interface ApiService {
if (BuildConfig.DEBUG) {
val interceptor = HttpLoggingInterceptor()
interceptor.setLevel(HttpLoggingInterceptor.Level.BODY)
val client = OkHttpClient.Builder().addInterceptor(interceptor).connectTimeout(60, TimeUnit.SECONDS).build()
val client = OkHttpClient.Builder().addInterceptor(interceptor).writeTimeout(30, TimeUnit.SECONDS).connectTimeout(180, TimeUnit.SECONDS).readTimeout(180, TimeUnit.SECONDS).build()
builder.client(client)
} else {
val client = OkHttpClient.Builder().connectTimeout(180, TimeUnit.SECONDS).build()
val client = OkHttpClient.Builder().writeTimeout(30, TimeUnit.SECONDS).connectTimeout(180, TimeUnit.SECONDS).readTimeout(180, TimeUnit.SECONDS).build()
builder.client(client)
}

Expand Down

0 comments on commit 0e6b85d

Please sign in to comment.