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; }