curl timeout, reorder layers, handle right click osx
This commit is contained in:
@@ -36,6 +36,7 @@ void LogRemote::net_init()
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &this->readBuffer);
|
||||
//curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, data_handler);
|
||||
curl_easy_setopt(curl, CURLOPT_TIMEOUT, 5L);
|
||||
}
|
||||
std::string LogRemote::net_request(std::string cmd, std::string data /*= ""*/)
|
||||
{
|
||||
@@ -45,6 +46,8 @@ std::string LogRemote::net_request(std::string cmd, std::string data /*= ""*/)
|
||||
auto url = m_url + cmd;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
|
||||
res = curl_easy_perform(curl);
|
||||
if (res != CURLcode::CURLE_OK)
|
||||
m_running = false;
|
||||
return readBuffer;
|
||||
}
|
||||
void LogRemote::net_close()
|
||||
|
||||
Reference in New Issue
Block a user