Explorar el Código

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

Tariq Ibrahim hace 6 años
padre
commit
6a67f44b69
Se han modificado 1 ficheros con 1 adiciones y 4 borrados
  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.