mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 13:21:00 +02:00
fix
This commit is contained in:
parent
42d35898b5
commit
330e76e09c
2 changed files with 2 additions and 2 deletions
|
@ -17,7 +17,7 @@ type Comm struct {
|
||||||
|
|
||||||
// NewConnection gets a new comm to a tcp address
|
// NewConnection gets a new comm to a tcp address
|
||||||
func NewConnection(address string) (c *Comm, err error) {
|
func NewConnection(address string) (c *Comm, err error) {
|
||||||
connection, err := net.DialTimeout("tcp", address, 3*time.Second)
|
connection, err := net.DialTimeout("tcp", address, 30*time.Second)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,7 +70,7 @@ func (s *server) start() (err error) {
|
||||||
|
|
||||||
func (s *server) run() (err error) {
|
func (s *server) run() (err error) {
|
||||||
log.Debugf("starting TCP server on " + s.port)
|
log.Debugf("starting TCP server on " + s.port)
|
||||||
server, err := net.Listen("tcp", "0.0.0.0:"+s.port)
|
server, err := net.Listen("tcp", ":"+s.port)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrap(err, "Error listening on :"+s.port)
|
return errors.Wrap(err, "Error listening on :"+s.port)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue