1
0
mirror of https://github.com/schollz/croc.git synced 2024-11-30 23:52:07 +03:00

fix corruption

This commit is contained in:
Zack Scholl 2018-10-09 21:15:00 -07:00
parent d1e1694631
commit 42344a4c6e
2 changed files with 2 additions and 2 deletions

View File

@ -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}
}

View File

@ -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)