Prior to this, RunWithContext would block and wait for the context to be
cancelled and error handling of the go routine was lost since the
channel was never read again.
Now we check if the channel has an error and return. Also if the context
is terminated we close the channel and return.
Prior to this, RunWithContext would block and wait for the context to be cancelled and error handling of the go routine was lost since the channel was never read again. Now we check if the channel has an error and return. Also if the context is terminated we close the channel and return.
Signed-off-by: Sébastien Han seb@redhat.com