Skip to content

Commit

Permalink
Adjust the place where socket_options is called
Browse files Browse the repository at this point in the history
  • Loading branch information
yhirose committed Sep 1, 2024
1 parent aac17a6 commit e11e92a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions httplib.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)) {
Expand Down

0 comments on commit e11e92a

Please sign in to comment.