mirror of
https://github.com/schollz/croc.git
synced 2024-12-02 23:22:23 +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 {
|
func New(c net.Conn) Comm {
|
||||||
c.SetReadDeadline(time.Now().Add(3 * time.Hour))
|
c.SetReadDeadline(time.Now().Add(3 * time.Hour))
|
||||||
c.SetDeadline(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}
|
return Comm{c}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -383,7 +383,7 @@ func receive(forceSend int, serverAddress string, tcpPorts []string, isLocal boo
|
|||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
for {
|
for {
|
||||||
// read from TCP connection
|
// read from TCP connection
|
||||||
message, _, _, err = tcpConnection.Read()
|
message, _, _, err := tcpConnection.Read()
|
||||||
// log.Debugf("message: %s", message)
|
// log.Debugf("message: %s", message)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error(err)
|
log.Error(err)
|
||||||
|
Loading…
Reference in New Issue
Block a user