From 02f5e35accfa19c32478bcc49460404fe129e3f6 Mon Sep 17 00:00:00 2001 From: bogdanadnan Date: Fri, 17 Aug 2018 19:23:58 +0300 Subject: [PATCH] Small fix for close socket. --- http/http.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/http/http.cpp b/http/http.cpp index bf8554c..54f987e 100755 --- a/http/http.cpp +++ b/http/http.cpp @@ -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; }