mirror of
https://github.com/suchmememanyskill/CYD-Klipper.git
synced 2026-03-21 05:33:24 +00:00
Set timeout for getting files
This commit is contained in:
3
CYD-Klipper/.vscode/settings.json
vendored
3
CYD-Klipper/.vscode/settings.json
vendored
@@ -10,6 +10,7 @@
|
||||
"string_view": "cpp",
|
||||
"initializer_list": "cpp",
|
||||
"algorithm": "cpp",
|
||||
"cstddef": "cpp"
|
||||
"cstddef": "cpp",
|
||||
"functional": "cpp"
|
||||
}
|
||||
}
|
||||
@@ -31,6 +31,7 @@ FILESYSTEM_FILE* get_files(int limit){
|
||||
sprintf(buff, "http://%s:%d/server/files/list", global_config.klipperHost, global_config.klipperPort);
|
||||
HTTPClient client;
|
||||
client.useHTTP10(true);
|
||||
client.setTimeout(5000);
|
||||
client.begin(buff);
|
||||
int httpCode = client.GET();
|
||||
auto timer_parse = millis();
|
||||
|
||||
Reference in New Issue
Block a user