Skip to content

Commit b8f6472

Browse files
committed
increase timeouts
1 parent 53db42f commit b8f6472

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/client.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -388,9 +388,9 @@ func (c *Croc) dialUp() (err error) {
388388
return
389389
}
390390
defer connection.Close()
391-
connection.SetReadDeadline(time.Now().Add(1 * time.Hour))
392-
connection.SetDeadline(time.Now().Add(1 * time.Hour))
393-
connection.SetWriteDeadline(time.Now().Add(1 * time.Hour))
391+
connection.SetReadDeadline(time.Now().Add(3 * time.Hour))
392+
connection.SetDeadline(time.Now().Add(3 * time.Hour))
393+
connection.SetWriteDeadline(time.Now().Add(3 * time.Hour))
394394
message, err := receiveMessage(connection)
395395
if err != nil {
396396
errorChan <- err

src/models.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ type Croc struct {
6868
func Init() (c *Croc) {
6969
c = new(Croc)
7070
c.TcpPorts = []string{"27030", "27031", "27032", "27033"}
71-
c.Timeout = 10 * time.Minute
71+
c.Timeout = 3 * time.Hour
7272
c.UseEncryption = true
7373
c.UseCompression = true
7474
c.AllowLocalDiscovery = true

src/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ func (c *Croc) processPayload(ws *websocket.Conn, cd channelData) (channel strin
265265
}
266266

267267
func (c *Croc) channelCleanup() {
268-
maximumWait := 10 * time.Minute
268+
maximumWait := 3 * time.Hour
269269
for {
270270
c.rs.Lock()
271271
keys := make([]string, len(c.rs.channel))

0 commit comments

Comments
 (0)