diff --git a/util/netpipe/pipe.go b/util/netpipe/pipe.go index 7bbc4fe8..fa0cb4b5 100644 --- a/util/netpipe/pipe.go +++ b/util/netpipe/pipe.go @@ -153,6 +153,10 @@ func (p *pipe) SetWriteDeadline(t time.Time) error { p.cond.L.Lock() defer p.cond.L.Unlock() + if p.closed { + return ErrPipeClosed + } + uid, err := uuid.NewV7() if err != nil { return err @@ -201,6 +205,10 @@ func (p *pipe) SetReadDeadline(t time.Time) error { p.cond.L.Lock() defer p.cond.L.Unlock() + if p.closed { + return ErrPipeClosed + } + uid, err := uuid.NewV7() if err != nil { return err