Skip to content

Commit 0dcac60

Browse files
committed
Update host_tcpportstatus.go
1 parent 9ba7a05 commit 0dcac60

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

pkg/collect/host_tcpportstatus.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,7 @@ func (c *CollectHostTCPPortStatus) Collect(progressChan chan<- interface{}) (map
5050
dialAddress = fmt.Sprintf("%s:%d", ip, c.hostCollector.Port)
5151
}
5252

53-
networkStatus, errorMessage, err := checkTCPConnection(progressChan, listenAddress, dialAddress, 10*time.Second)
54-
if err != nil {
55-
return nil, err
56-
}
53+
networkStatus, errorMessage, checkErr := checkTCPConnection(progressChan, listenAddress, dialAddress, 10*time.Second)
5754

5855
result := NetworkStatusResult{
5956
Status: networkStatus,
@@ -75,7 +72,7 @@ func (c *CollectHostTCPPortStatus) Collect(progressChan chan<- interface{}) (map
7572

7673
return map[string][]byte{
7774
name: b,
78-
}, nil
75+
}, checkErr
7976
}
8077

8178
func getIPv4FromInterface(iface *net.Interface) (net.IP, error) {

0 commit comments

Comments
 (0)