client-go PortForwarder: don't log an error if net.Listen fails
This commit is contained in:
		| @@ -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) { | 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)) | 	listener, err := net.Listen(protocol, fmt.Sprintf("%s:%d", hostname, port.Local)) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		runtime.HandleError(fmt.Errorf("Unable to create listener: Error %s", err)) | 		return nil, fmt.Errorf("Unable to create listener: Error %s", err) | ||||||
| 		return nil, err |  | ||||||
| 	} | 	} | ||||||
| 	listenerAddress := listener.Addr().String() | 	listenerAddress := listener.Addr().String() | ||||||
| 	host, localPort, _ := net.SplitHostPort(listenerAddress) | 	host, localPort, _ := net.SplitHostPort(listenerAddress) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Yves Peter
					Yves Peter