From 0bc48a5a2ea65695cdd6302a778692df30311157 Mon Sep 17 00:00:00 2001 From: Andy Wang Date: Fri, 30 Aug 2019 20:45:06 +0100 Subject: [PATCH] Remove redundant err checking TODO --- internal/multiplex/stream.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/multiplex/stream.go b/internal/multiplex/stream.go index 7064288..016fe30 100644 --- a/internal/multiplex/stream.go +++ b/internal/multiplex/stream.go @@ -120,9 +120,8 @@ func (s *Stream) Write(in []byte) (n int, err error) { // the necessary steps to mark the stream as closed and to release resources func (s *Stream) _close() { - // TODO: return err here atomic.StoreUint32(&s.closed, 1) - s.recvBuf.Close() + _ = s.recvBuf.Close() // both datagramBuffer and streamBuffer won't return err on Close() } // only close locally. Used when the stream close is notified by the remote