Skip to content

Commit

Permalink
port error: check for error
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Hunt <pehunt@redhat.com>
  • Loading branch information
haircommander committed Jul 27, 2020
1 parent 7854af4 commit 61a236b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/oci/runtime_oci.go
Expand Up @@ -874,8 +874,9 @@ func (r *runtimeOCI) PortForwardContainer(c *Container, port int32, stream io.Re
defer func() {
if emptyStreamOnError {
go func() {
_, copyError := pools.Copy(ioutil.Discard, stream)
logrus.Errorf("error closing port forward stream after other error: %v", copyError)
if _, copyError := pools.Copy(ioutil.Discard, stream); copyError != nil {
logrus.Errorf("error closing port forward stream after other error: %v", copyError)
}
}()
}
}()
Expand Down

0 comments on commit 61a236b

Please sign in to comment.