From 42344a4c6e1e21029f9feba103a9fa8d8107e263 Mon Sep 17 00:00:00 2001 From: Zack Scholl Date: Tue, 9 Oct 2018 21:15:00 -0700 Subject: [PATCH] fix corruption --- src/comm/comm.go | 2 +- src/recipient/recipient.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/comm/comm.go b/src/comm/comm.go index 44c0c6e9..4a327e4a 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 ac83d658..e0e83ff2 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)