increase timeouts

This commit is contained in:
Zack Scholl 2018-07-10 08:43:54 -07:00
parent 53db42fe5f
commit b8f647291a
3 changed files with 5 additions and 5 deletions

View File

@ -388,9 +388,9 @@ func (c *Croc) dialUp() (err error) {
return
}
defer connection.Close()
connection.SetReadDeadline(time.Now().Add(1 * time.Hour))
connection.SetDeadline(time.Now().Add(1 * time.Hour))
connection.SetWriteDeadline(time.Now().Add(1 * time.Hour))
connection.SetReadDeadline(time.Now().Add(3 * time.Hour))
connection.SetDeadline(time.Now().Add(3 * time.Hour))
connection.SetWriteDeadline(time.Now().Add(3 * time.Hour))
message, err := receiveMessage(connection)
if err != nil {
errorChan <- err

View File

@ -68,7 +68,7 @@ type Croc struct {
func Init() (c *Croc) {
c = new(Croc)
c.TcpPorts = []string{"27030", "27031", "27032", "27033"}
c.Timeout = 10 * time.Minute
c.Timeout = 3 * time.Hour
c.UseEncryption = true
c.UseCompression = true
c.AllowLocalDiscovery = true

View File

@ -265,7 +265,7 @@ func (c *Croc) processPayload(ws *websocket.Conn, cd channelData) (channel strin
}
func (c *Croc) channelCleanup() {
maximumWait := 10 * time.Minute
maximumWait := 3 * time.Hour
for {
c.rs.Lock()
keys := make([]string, len(c.rs.channel))