Skip to content

ConnectTimeoutError should satisfy net.Error #95

@lavoiesl

Description

@lavoiesl

I’m not quite sure why it was done this way, but gomemcache creates a ConnectTimeoutError instead of the standard i/o timeout or net.OpError.

This, in turn, does not have the Timeout() and Temporary() methods to satisfy the net.Error interface, obfuscating the error handling for clients.

In our library, we ended up recreating a net.OpError: Shopify/goose#35

Could you clarify why it was done way?

I would suggest getting rid of ConnectTimeoutError and instead wrapping the poll.TimeoutError in a net.OpError to satisfy the interface and retain proper messaging.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions