Skip to content

close can fail on FreeBSD with ECONNRESET #786

@talex5

Description

@talex5

On FreeBSD, closing a socket can return ECONNRESET. See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=159179 and python/cpython#2565.

Eio should ignore this error automatically. This is how Python handles it:

https://github.com/python/cpython/blob/15d6506d175780bb29e5fcde654e3860408aa93e/Modules/socketmodule.c#L6215-L6218

https://man.freebsd.org/cgi/man.cgi?query=close&sektion=2 says:

In case of any error except EBADF, the supplied file descriptor is deallocated and therefore is no longer valid.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions