mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-09 02:50:04 +00:00
client-go PortForwarder: don't log an error if net.Listen fails
Kubernetes-commit: 99711a96a4e5fbd2bc26cbc070c96852c5939570
This commit is contained in:
committed by
Kubernetes Publisher
parent
f64a115c80
commit
1baf68dddb
@@ -209,8 +209,7 @@ func (pf *PortForwarder) listenOnPortAndAddress(port *ForwardedPort, protocol st
|
||||
func (pf *PortForwarder) getListener(protocol string, hostname string, port *ForwardedPort) (net.Listener, error) {
|
||||
listener, err := net.Listen(protocol, fmt.Sprintf("%s:%d", hostname, port.Local))
|
||||
if err != nil {
|
||||
runtime.HandleError(fmt.Errorf("Unable to create listener: Error %s", err))
|
||||
return nil, err
|
||||
return nil, fmt.Errorf("Unable to create listener: Error %s", err)
|
||||
}
|
||||
listenerAddress := listener.Addr().String()
|
||||
host, localPort, _ := net.SplitHostPort(listenerAddress)
|
||||
|
Reference in New Issue
Block a user