mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
Check the error return from listener close
This commit is contained in:
parent
9b54021c65
commit
158cf5d61a
@ -208,7 +208,10 @@ func (poc PortOpenCheck) Check() (warnings, errorList []error) {
|
||||
errorList = []error{errors.Errorf("Port %d is in use", poc.port)}
|
||||
}
|
||||
if ln != nil {
|
||||
ln.Close()
|
||||
if err = ln.Close(); err != nil {
|
||||
warnings = append(warnings,
|
||||
errors.Errorf("when closing port %d, encountered %v", poc.port, err))
|
||||
}
|
||||
}
|
||||
|
||||
return nil, errorList
|
||||
|
Loading…
Reference in New Issue
Block a user