1
0
mirror of https://github.com/gusaul/grpcox.git synced 2024-12-25 09:50:10 +00:00

remove os exit from handling

This commit is contained in:
aultokped 2018-11-05 13:48:26 +07:00
parent 4c008d1116
commit 75b72d5c7b

View File

@ -146,8 +146,7 @@ func (r *Resource) Invoke(ctx context.Context, symbol string, in io.Reader) (str
}
if h.Status.Code() != codes.OK {
log.Printf("ERROR:\n Code: %s\n Message: %s\n", h.Status.Code().String(), h.Status.Message())
r.exit(1)
return "", end, fmt.Errorf(h.Status.Message())
}
// copy the output in a separate goroutine so printing can't block indefinitely