mirror of
https://github.com/containers/skopeo.git
synced 2025-06-27 23:27:29 +00:00
proxy: Use float → int helper for pipeid
Just noticed while scrolling past the code. Signed-off-by: Colin Walters <walters@verbum.org>
This commit is contained in:
parent
6510f1011b
commit
a3adf36db6
@ -491,11 +491,11 @@ func (h *proxyHandler) FinishPipe(args []interface{}) (replyBuf, error) {
|
|||||||
|
|
||||||
var ret replyBuf
|
var ret replyBuf
|
||||||
|
|
||||||
pipeidf, ok := args[0].(float64)
|
pipeidv, err := parseUint64(args[0])
|
||||||
if !ok {
|
if err != nil {
|
||||||
return ret, fmt.Errorf("finishpipe: expecting pipeid, not %T", args[0])
|
return ret, err
|
||||||
}
|
}
|
||||||
pipeid := uint32(pipeidf)
|
pipeid := uint32(pipeidv)
|
||||||
|
|
||||||
f, ok := h.activePipes[pipeid]
|
f, ok := h.activePipes[pipeid]
|
||||||
if !ok {
|
if !ok {
|
||||||
@ -507,7 +507,7 @@ func (h *proxyHandler) FinishPipe(args []interface{}) (replyBuf, error) {
|
|||||||
// And only now do we close the write half; this forces the client to call this API
|
// And only now do we close the write half; this forces the client to call this API
|
||||||
f.w.Close()
|
f.w.Close()
|
||||||
// Propagate any errors from the goroutine worker
|
// Propagate any errors from the goroutine worker
|
||||||
err := f.err
|
err = f.err
|
||||||
delete(h.activePipes, pipeid)
|
delete(h.activePipes, pipeid)
|
||||||
return ret, err
|
return ret, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user