mirror of
https://github.com/kubescape/kubescape.git
synced 2026-04-15 06:58:11 +00:00
Adding error log in case of a timeout
Signed-off-by: Amit Schendel <amitschendel@gmail.com>
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
logger "github.com/kubescape/go-logger"
|
||||
servicediscovery "github.com/kubescape/kubescape-network-scanner/cmd"
|
||||
)
|
||||
|
||||
@@ -42,6 +43,7 @@ func isUnauthenticatedService(host string, port int, namespace string) bool {
|
||||
case result := <-results:
|
||||
return result
|
||||
case <-time.After(Timeout):
|
||||
logger.L().Error(fmt.Sprintf("Timeout while scanning service: %s", k8sService))
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user