Adjust the place where socket_options is called
This commit is contained in:
parent
aac17a67e0
commit
e11e92a37e
@ -3371,8 +3371,6 @@ socket_t create_socket(const std::string &host, const std::string &ip, int port,
|
||||
#endif
|
||||
}
|
||||
|
||||
if (socket_options) { socket_options(sock); }
|
||||
|
||||
if (rp->ai_family == AF_INET6) {
|
||||
auto opt = ipv6_v6only ? 1 : 0;
|
||||
#ifdef _WIN32
|
||||
@ -3384,6 +3382,8 @@ socket_t create_socket(const std::string &host, const std::string &ip, int port,
|
||||
#endif
|
||||
}
|
||||
|
||||
if (socket_options) { socket_options(sock); }
|
||||
|
||||
// bind or connect
|
||||
auto quit = false;
|
||||
if (bind_or_connect(sock, *rp, quit)) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user