Skip to content

Use of SO_REUSEADDR #506

Closed
Closed
@vshu3000

Description

1908     // Make 'reuse address' option available
1909     int yes = 1;
1910     setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, reinterpret_cast<char *>(&yes),
1911                sizeof(yes));
1912 
1913 #ifdef SO_REUSEPORT
1914     setsockopt(sock, SOL_SOCKET, SO_REUSEPORT, reinterpret_cast<char *>(&yes),
1915                sizeof(yes));
1916 #endif

So now it always reuses socket. The line outside ifdef should be removed.

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