MCPcopy Create free account
hub / github.com/chrxh/alien / executeRequest

Function executeRequest

source/Network/NetworkService.cpp:31–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29 }
30
31 httplib::Result executeRequest(std::function<httplib::Result()> const& func, bool withRetry = true)
32 {
33 auto attempt = 0;
34 while (true) {
35 auto result = func();
36 if (result) {
37 return result;
38 }
39 if (++attempt == 5 || !withRetry) {
40 throw std::runtime_error("Error connecting to the server.");
41 }
42 std::this_thread::sleep_for(std::chrono::milliseconds(100));
43 }
44 }
45
46 void logNetworkError()
47 {

Callers 15

createUserMethod · 0.85
activateUserMethod · 0.85
loginMethod · 0.85
logoutMethod · 0.85
refreshLoginMethod · 0.85
deleteUserMethod · 0.85
resetPasswordMethod · 0.85
setNewPasswordMethod · 0.85
getNetworkResourcesMethod · 0.85
getUserListMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected