diff --git a/src/comm/comm.go b/src/comm/comm.go index 44c0c6e..4a327e4 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/recipient/recipient.go b/src/recipient/recipient.go index ac83d65..e0e83ff 100644 --- a/src/recipient/recipient.go +++ b/src/recipient/recipient.go @@ -383,7 +383,7 @@ func receive(forceSend int, serverAddress string, tcpPorts []string, isLocal boo defer wg.Done() for { // read from TCP connection - message, _, _, err = tcpConnection.Read() + message, _, _, err := tcpConnection.Read() // log.Debugf("message: %s", message) if err != nil { log.Error(err)