mirror of
https://github.com/schollz/croc.git
synced 2024-11-30 23:52:07 +03:00
fix corruption
This commit is contained in:
parent
d1e1694631
commit
42344a4c6e
@ -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}
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user