mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-08-30 07:42:54 +02:00
simplify connection close
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
Reference in New Issue
Block a user