Skip to content

Return net.ErrClosed instead of errors.New("use of closed network connection") #50

@dimalinux

Description

@dimalinux

Right now when the library returns "closed" errors (which many users need to test against), it is not returning net.ErrClosed like the standard net libraries since Go 1.16. Instead of returning a local error that requires us to inspect the message text, can you return net.ErrClosed instead? It won't break existing code that checks the message, as the message inside of net.ErrClosed is identical. On the plus side, it will make the vsock library more compatible with code that was written to the built-in net library APIs. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions