From 6955f194396aa93d92115f634801c8bb28c74da3 Mon Sep 17 00:00:00 2001 From: Zack Scholl Date: Tue, 9 Oct 2018 19:01:50 -0700 Subject: [PATCH] recipient can easily stop now --- src/comm/comm.go | 2 +- src/croc/sending.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/comm/comm.go b/src/comm/comm.go index 631000cc..d5a905e7 100644 --- a/src/comm/comm.go +++ b/src/comm/comm.go @@ -18,7 +18,7 @@ type Comm struct { func New(c net.Conn) Comm { c.SetReadDeadline(time.Now().Add(3 * time.Hour)) c.SetDeadline(time.Now().Add(3 * time.Hour)) - c.SetWriteDeadline(time.Now().Add(3 * time.Hour)) + c.SetWriteDeadline(time.Now().Add(5 * time.Second)) return Comm{c} } diff --git a/src/croc/sending.go b/src/croc/sending.go index 28696448..1da231d1 100644 --- a/src/croc/sending.go +++ b/src/croc/sending.go @@ -183,7 +183,7 @@ func (c *Croc) sendReceive(address, websocketPort string, tcpPorts []string, fna } select { case <-done: - case <-time.After(time.Second): + case <-time.After(100 * time.Millisecond): } return nil }