mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-23 07:14:46 +00:00
timeout settings in http proxy
This commit is contained in:
3 files changed
+5
-1
No files matched your search
@@ -12,11 +12,13 @@ import (
|
||||
// UnmarshalJSON implements json.Unmarshaler
|
||||
func (this *Config) UnmarshalJSON(data []byte) error {
|
||||
type JsonConfig struct {
|
||||
Timeout int `json:"timeout"`
|
||||
}
|
||||
jsonConfig := new(JsonConfig)
|
||||
if err := json.Unmarshal(data, jsonConfig); err != nil {
|
||||
return errors.New("HTTP: Failed to parse config: " + err.Error())
|
||||
}
|
||||
this.Timeout = jsonConfig.Timeout
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user