osbuildexecutor: wait until worker-executor closes the connection
Otherwise the client will try to fetch the output archive before the build output is archived on the worker-executor side.
This commit is contained in:
parent
db43ec8e60
commit
8a5f486715
1 changed files with 5 additions and 0 deletions
|
|
@ -148,6 +148,11 @@ func handleBuild(inputArchive, host string) (*osbuild.Result, error) {
|
|||
return nil, fmt.Errorf("Unable to decode response body into osbuild result: %w", err)
|
||||
}
|
||||
|
||||
_, err = io.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Unable to wait for executor to close connection: %w", err)
|
||||
}
|
||||
|
||||
return &osbuildResult, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue