simplify connection close

This commit is contained in:
Marc Tarnutzer
2023-05-04 23:54:39 +02:00
parent 9c01ead91f
commit f152a5e0c7

View File

@@ -204,10 +204,5 @@ func (c *Connection) ReadMessage(ctx context.Context) ([]byte, error) {
}
func (c *Connection) Close() error {
err := c.conn.Close()
if err != nil {
return fmt.Errorf("failed to close connection: %w", err)
}
return nil
return c.conn.Close()
}