فهرست منبع

Merge branch 'master' into staging-client

Rod Hynes 3 روز پیش
والد
کامیت
882d21673e
2فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  1. 1 0
      MobileLibrary/Android/PsiphonTunnel/PsiphonTunnel.java
  2. 2 0
      psiphon/common/dsl/relay.go

+ 1 - 0
MobileLibrary/Android/PsiphonTunnel/PsiphonTunnel.java

@@ -319,6 +319,7 @@ public class PsiphonTunnel {
         private final ExecutorService callbackQueue = Executors.newSingleThreadExecutor();
 
         void shutdownAndAwaitTermination(ExecutorService pool) {
+            pool.shutdown();
             try {
                 // Wait a while for existing tasks to terminate
                 if (!pool.awaitTermination(5, TimeUnit.SECONDS)) {

+ 2 - 0
psiphon/common/dsl/relay.go

@@ -224,6 +224,7 @@ func (r *Relay) Reload() (bool, error) {
 		r.httpClient = &http.Client{
 			Transport: &http.Transport{
 				TLSClientConfig:     r.tlsConfig,
+				ForceAttemptHTTP2:   true,
 				MaxConnsPerHost:     httpTransport.MaxConnsPerHost,
 				MaxIdleConns:        httpTransport.MaxIdleConns,
 				MaxIdleConnsPerHost: httpTransport.MaxIdleConnsPerHost,
@@ -281,6 +282,7 @@ func (r *Relay) SetRequestParameters(
 		r.httpClient = &http.Client{
 			Transport: &http.Transport{
 				TLSClientConfig:     r.tlsConfig,
+				ForceAttemptHTTP2:   true,
 				MaxConnsPerHost:     maxHttpConns,
 				MaxIdleConns:        maxHttpIdleConns,
 				MaxIdleConnsPerHost: maxHttpIdleConns,