mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-24 01:22:23 +08:00
Improved error handling of gta_data_service. (#412)
* Bug fix for #403 * Fixed Issue #403 * Minor fixes. * Improved error handling of gta_data_service. Fixed an issue where the game crashes when throwing invalid json format exception. * Minor fixes. * Minor fixes. * Improved error handling of gta_data_service. Also extended the timeout to 30s. * Improved error handling of gta_data_service. - Fixed an issue where http_request doesn't handle HEAD requests and socket.recv error correctly. - Limited gta_data_service to have only 1 active http request. * Minor fixes. * Minor fixes.
This commit is contained in:
@ -41,11 +41,14 @@ namespace big
|
||||
const std::vector<weapon_item>& get_weapon_arr();
|
||||
|
||||
private:
|
||||
void load_from_file(std::string file_path, std::string etag_path, std::string url, bool(gta_data_service::* load_func)(file), std::string data_name);
|
||||
void load_from_file(
|
||||
std::string file_path, std::string etag_path, std::string url,
|
||||
bool(gta_data_service::* load_func)(std::filesystem::path), std::string data_name
|
||||
);
|
||||
|
||||
bool load_vehicles(file file_to_load);
|
||||
bool load_peds(file file_to_load);
|
||||
bool load_weapons(file file_to_load);
|
||||
bool load_vehicles(std::filesystem::path path);
|
||||
bool load_peds(std::filesystem::path path);
|
||||
bool load_weapons(std::filesystem::path path);
|
||||
};
|
||||
|
||||
inline gta_data_service* g_gta_data_service{};
|
||||
|
Reference in New Issue
Block a user