From 6a67f44b69004415802d2e678e483065b8fff6c8 Mon Sep 17 00:00:00 2001 From: Tariq Ibrahim Date: Fri, 26 Apr 2019 21:02:11 -0700 Subject: [PATCH] remove redundant err!=nil check in conn.go Close method (#505) --- conn.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/conn.go b/conn.go index 3848ab4a..9971ea36 100644 --- a/conn.go +++ b/conn.go @@ -708,10 +708,7 @@ func (w *messageWriter) Close() error { if w.err != nil { return w.err } - if err := w.flushFrame(true, nil); err != nil { - return err - } - return nil + return w.flushFrame(true, nil) } // WritePreparedMessage writes prepared message into connection.