From b91ab53219f6e1f5e6510eaa4ea0d5b1475aab43 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 2 Jan 2016 17:34:29 -0600 Subject: [PATCH] Connection reuse is broken in GFE's server (requests always get reissued on a new connection) so just turn it off --- moonlight-common/src/com/limelight/nvstream/http/NvHTTP.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/moonlight-common/src/com/limelight/nvstream/http/NvHTTP.java b/moonlight-common/src/com/limelight/nvstream/http/NvHTTP.java index a3e2cff2..2daf8e22 100644 --- a/moonlight-common/src/com/limelight/nvstream/http/NvHTTP.java +++ b/moonlight-common/src/com/limelight/nvstream/http/NvHTTP.java @@ -36,6 +36,7 @@ import org.xmlpull.v1.XmlPullParserFactory; import com.limelight.LimeLog; import com.limelight.nvstream.ConnectionContext; import com.limelight.nvstream.http.PairingManager.PairState; +import com.squareup.okhttp.ConnectionPool; import com.squareup.okhttp.OkHttpClient; import com.squareup.okhttp.Request; import com.squareup.okhttp.Response; @@ -95,6 +96,7 @@ public class NvHTTP { public boolean verify(String hostname, SSLSession session) { return true; } }; + httpClient.setConnectionPool(new ConnectionPool(0, 0)); httpClient.setHostnameVerifier(hv); httpClient.setConnectTimeout(CONNECTION_TIMEOUT, TimeUnit.MILLISECONDS);