This commit is contained in:
Zack Scholl 2019-04-29 13:53:12 -06:00
parent 8dc8783bd4
commit b9a5f450c5
2 changed files with 1 additions and 5 deletions

View File

@ -17,13 +17,10 @@ type Comm struct {
// NewConnection gets a new comm to a tcp address
func NewConnection(address string) (c Comm, err error) {
connection, err := net.DialTimeout("tcp", address, 3*time.Hour)
connection, err := net.DialTimeout("tcp", address, 3*time.Second)
if err != nil {
return
}
connection.SetReadDeadline(time.Now().Add(3 * time.Hour))
connection.SetDeadline(time.Now().Add(3 * time.Hour))
connection.SetWriteDeadline(time.Now().Add(3 * time.Hour))
c = New(connection)
return
}

View File

@ -9,7 +9,6 @@ import (
"github.com/pkg/errors"
"github.com/schollz/croc/src/comm"
"github.com/schollz/croc/src/logger"
"github.com/schollz/croc/src/models"
)
const TCP_BUFFER_SIZE = 1024 * 64