mirror of https://github.com/schollz/croc.git
increase timeouts
This commit is contained in:
parent
53db42fe5f
commit
b8f647291a
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue