Browse Source

enable connection reuse by default

v2ray 9 years ago
parent
commit
b17edf907e
2 changed files with 4 additions and 2 deletions
  1. 3 1
      transport/config_json.go
  2. 1 1
      transport/transport.go

+ 3 - 1
transport/config_json.go

@@ -8,7 +8,9 @@ func (this *Config) UnmarshalJSON(data []byte) error {
 	type JsonConfig struct {
 		ConnectionReuse bool `json:"connectionReuse"`
 	}
-	jsonConfig := new(JsonConfig)
+	jsonConfig := &JsonConfig{
+		ConnectionReuse: true,
+	}
 	if err := json.Unmarshal(data, jsonConfig); err != nil {
 		return err
 	}

+ 1 - 1
transport/transport.go

@@ -1,7 +1,7 @@
 package transport
 
 var (
-	connectionReuse = false
+	connectionReuse = true
 )
 
 func IsConnectionReusable() bool {