Browse Source

remove redundant err!=nil check in conn.go Close method (#505)

Tariq Ibrahim 6 years ago
parent
commit
6a67f44b69
1 changed files with 1 additions and 4 deletions
  1. 1 4
      conn.go

+ 1 - 4
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.