Skip to content

Why is SO_LINGER set by default ? #4957

@syborg64

Description

@syborg64

in posix os_socket_bind

    struct linger ling;
    ling.l_onoff = 1;
    ling.l_linger = 0;
    ret = setsockopt(socket, SOL_SOCKET, SO_LINGER, &ling, sizeof(ling));
    if (ret < 0) {
        goto fail;
    }

Linger is set to 0 immediately after any bind.
I couldn't find any references to it, in blames or in the github.
This means closing any connection fails with a reset ? why is that set ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions