From 12e6c1b382f9896bad4dcabc8ced02701168560c Mon Sep 17 00:00:00 2001 From: xtaci Date: Tue, 14 May 2019 11:08:51 +0800 Subject: [PATCH] add a line of comment --- stream.go | 1 + 1 file changed, 1 insertion(+) diff --git a/stream.go b/stream.go index 5da942c..5515ee5 100644 --- a/stream.go +++ b/stream.go @@ -109,6 +109,7 @@ func (s *Stream) Write(b []byte) (n int, err error) { deadline = timer.C } + // check if stream has closed select { case <-s.die: return 0, errors.WithStack(io.ErrClosedPipe)