mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-08-30 15:52:03 +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 {
|
func (c *Connection) Close() error {
|
||||||
err := c.conn.Close()
|
return c.conn.Close()
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("failed to close connection: %w", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user