diff --git a/VERSION b/VERSION index 82aa315..59e9e60 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.11-DEVEL +1.0.11 diff --git a/collector/collector.go b/collector/collector.go index 0b66c31..47b611c 100644 --- a/collector/collector.go +++ b/collector/collector.go @@ -245,7 +245,7 @@ func (c *collector) connect(d *config.Device) (*routeros.Client, error) { log.WithField("device", d.Name).Debug("trying to Dial") if !c.enableTLS { - conn, err = net.Dial("tcp", d.Address+apiPort) + conn, err = net.DialTimeout("tcp", d.Address+apiPort, c.timeout) if err != nil { return nil, err } @@ -254,7 +254,10 @@ func (c *collector) connect(d *config.Device) (*routeros.Client, error) { tlsCfg := &tls.Config{ InsecureSkipVerify: c.insecureTLS, } - conn, err = tls.Dial("tcp", d.Address+apiPortTLS, tlsCfg) + conn, err = tls.DialWithDialer(&net.Dialer{ + Timeout: c.timeout, + }, + "tcp", d.Address+apiPortTLS, tlsCfg) if err != nil { return nil, err }