Skip to content

Commit

Permalink
Small fix for close socket.
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdanadnan committed Aug 17, 2018
1 parent ff4db4b commit 02f5e35
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions http/http.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,11 @@ string http::__get_response(const string &url, const string &post_data) {
if(n > 0)
http_parser_execute(&parser, &settings, buffer, n);

#ifdef _WIN64
closesocket(sockfd);
#else
close(sockfd);
#endif
if(reply != "")
break;
}
Expand Down

0 comments on commit 02f5e35

Please sign in to comment.