Update PR

* Update PR
This commit is contained in:
abraunegg 2025-12-27 20:25:55 +11:00
commit f035923505
2 changed files with 2 additions and 9 deletions

View file

@ -8,7 +8,7 @@ module curlWebsockets;
// What does this module require to function?
import etc.c.curl : CURL, CURLcode, curl_easy_cleanup, curl_easy_getinfo,
curl_easy_init, curl_easy_perform, curl_easy_recv, curl_easy_reset,
curl_easy_send, curl_easy_setopt, curl_global_cleanup, curl_global_init;
curl_easy_send, curl_easy_setopt;
import core.stdc.string : memcpy, memmove;
import core.time : MonoTime, dur;
@ -97,7 +97,6 @@ public:
curl = null;
}
websocketConnected = false;
object.destroy(curl);
logCurlWebsocketOutput("Cleaned-up an instance of a CurlWebSocket object accessing libcurl for HTTP operations");
}

View file

@ -477,12 +477,6 @@ bool testInternetReachability(ApplicationConfig appConfig, bool displayLogging =
scope(exit) {
// Shut http down http object
http.shutdown();
// Destroy http object
object.destroy(http);
// Perform Garbage Collection
GC.collect();
// Return free memory to the OS
GC.minimize();
}
// Execute the request and handle exceptions
@ -492,7 +486,7 @@ bool testInternetReachability(ApplicationConfig appConfig, bool displayLogging =
}
http.perform();
// Check response for HTTP status code
// Check response for HTTP status code - consider 2xx and 3xx as "reachable"
if (http.statusLine.code >= 200 && http.statusLine.code < 400) {
if (displayLogging) {
addLogEntry("Successfully reached the Microsoft OneDrive Service");