Set Gigahorse readTimeout to 1 hour

This commit is contained in:
Peter Neyens 2018-06-16 10:11:36 +01:00
parent b53a99b903
commit 3b9385dfc5
2 changed files with 4 additions and 3 deletions

View File

@ -1,7 +1,8 @@
package sbt.librarymanagement
import gigahorse._, support.okhttp.Gigahorse
import scala.concurrent.duration.DurationInt
object Http {
lazy val http: HttpClient = Gigahorse.http(gigahorse.Config())
lazy val http: HttpClient = Gigahorse.http(gigahorse.Config().withReadTimeout(60.minutes))
}

View File

@ -198,8 +198,8 @@ class GigahorseUrlHandler extends AbstractURLHandler {
object GigahorseUrlHandler {
import gigahorse.HttpClient
import gigahorse.support.okhttp.Gigahorse
import okhttp3.{ OkHttpClient, JavaNetAuthenticator }
import sbt.librarymanagement.Http
// This is requires to access the constructor of URLInfo.
private[sbt] class SbtUrlInfo(available: Boolean,
@ -214,7 +214,7 @@ object GigahorseUrlHandler {
private val EmptyBuffer: Array[Byte] = new Array[Byte](0)
lazy val http: HttpClient = Gigahorse.http(gigahorse.Config())
lazy val http: HttpClient = Http.http
private lazy val okHttpClient: OkHttpClient = {
http