check size of written json

pull/17694/head
absolutelightning 1 year ago
parent 74de240902
commit 796a88a952

@ -42,11 +42,15 @@ func makeBootstrapPipe(bootstrapJSON []byte) (string, error) {
}
// Write the config
_, err = pipeConn.Write(bootstrapJSON)
n, err = pipeConn.Write(bootstrapJSON)
if err != nil {
return pipeFile, err
}
if n < len(bootstrapJSON) {
return pipeFile, fmt.Errorf("failed writing boostrap to child STDIN: %s", err)
}
// We can't wait for the process since we need to exec into Envoy before it
// will be able to complete so it will be remain as a zombie until Envoy is
// killed then will be reaped by the init process (pid 0). This is all a bit

Loading…
Cancel
Save