mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 13:21:00 +02:00
longer time for local connections
This commit is contained in:
parent
2bfbacf972
commit
d0ebb7ad38
1 changed files with 2 additions and 2 deletions
|
@ -583,7 +583,7 @@ func (c *Client) Receive() (err error) {
|
||||||
log.Debug("establishing connection")
|
log.Debug("establishing connection")
|
||||||
}
|
}
|
||||||
var banner string
|
var banner string
|
||||||
durations := []time.Duration{100 * time.Millisecond, 5 * time.Second}
|
durations := []time.Duration{200 * time.Millisecond, 5 * time.Second}
|
||||||
err = fmt.Errorf("found no addresses to connect")
|
err = fmt.Errorf("found no addresses to connect")
|
||||||
for i, address := range []string{c.Options.RelayAddress6, c.Options.RelayAddress} {
|
for i, address := range []string{c.Options.RelayAddress6, c.Options.RelayAddress} {
|
||||||
if address == "" {
|
if address == "" {
|
||||||
|
@ -652,7 +652,7 @@ func (c *Client) Receive() (err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
serverTry := fmt.Sprintf("%s:%s", ip, port)
|
serverTry := fmt.Sprintf("%s:%s", ip, port)
|
||||||
conn, banner2, externalIP, errConn := tcp.ConnectToTCPServer(serverTry, c.Options.RelayPassword, c.Options.SharedSecret[:3], 50*time.Millisecond)
|
conn, banner2, externalIP, errConn := tcp.ConnectToTCPServer(serverTry, c.Options.RelayPassword, c.Options.SharedSecret[:3], 250*time.Millisecond)
|
||||||
if errConn != nil {
|
if errConn != nil {
|
||||||
log.Debugf("could not connect to " + serverTry)
|
log.Debugf("could not connect to " + serverTry)
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue