Merge pull request #5222 from fuweid/follow-up-5174
runtime/v2: add comment for checkCopyShimLogError
This commit is contained in:
commit
92c1bbb253
@ -98,6 +98,9 @@ func (b *binary) Start(ctx context.Context, opts *types.Any, onClose func()) (_
|
||||
go func() {
|
||||
defer f.Close()
|
||||
_, err := io.Copy(os.Stderr, f)
|
||||
// To prevent flood of error messages, the expected error
|
||||
// should be reset, like os.ErrClosed or os.ErrNotExist, which
|
||||
// depends on platform.
|
||||
err = checkCopyShimLogError(ctx, err)
|
||||
if err != nil {
|
||||
log.G(ctx).WithError(err).Error("copy shim log")
|
||||
|
@ -97,6 +97,9 @@ func loadShim(ctx context.Context, bundle *Bundle, events *exchange.Exchange, rt
|
||||
go func() {
|
||||
defer f.Close()
|
||||
_, err := io.Copy(os.Stderr, f)
|
||||
// To prevent flood of error messages, the expected error
|
||||
// should be reset, like os.ErrClosed or os.ErrNotExist, which
|
||||
// depends on platform.
|
||||
err = checkCopyShimLogError(ctx, err)
|
||||
if err != nil {
|
||||
log.G(ctx).WithError(err).Error("copy shim log after reload")
|
||||
|
Loading…
Reference in New Issue
Block a user