Skip to content

Commit

Permalink
fix: #264 increase timeout to 2 minutes
Browse files Browse the repository at this point in the history
  • Loading branch information
jm33-m0 committed Oct 10, 2023
1 parent d5fc0d0 commit cc7034d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/lib/agent/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ func ApplyRuntimeConfig() (err error) {
addr := fmt.Sprintf("0.0.0.0:%s", RuntimeConfig.AutoProxyPort)
emp3r0r_data.ProxyServer, err = socks5.NewClassicServer(addr, "",
RuntimeConfig.ShadowsocksPort, RuntimeConfig.ShadowsocksPassword,
RuntimeConfig.AutoProxyTimeout, RuntimeConfig.AutoProxyTimeout)
0, 0) // set timeout to 0 to fix #264
return
}
2 changes: 1 addition & 1 deletion core/lib/cc/buildAgent.go
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ func InitConfigFile(cc_host string) (err error) {
RuntimeConfig.BroadcastIntervalMax = 130
RuntimeConfig.IndicatorWaitMin = 30
RuntimeConfig.IndicatorWaitMax = 130
RuntimeConfig.AutoProxyTimeout = 10
RuntimeConfig.AutoProxyTimeout = 130 // increase timeout to address #264

return save_config_json()
}
Expand Down
2 changes: 1 addition & 1 deletion core/lib/tun/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func FwdToDport(ctx context.Context, cancel context.CancelFunc,
return
}

// 10s timeout, in case we open too many connections
// timeout, in case we open too many connections
if timeout != 0 {
dest.SetDeadline(time.Now().Add(time.Duration(timeout) * time.Second))
}
Expand Down

0 comments on commit cc7034d

Please sign in to comment.