Closed Kxnrl closed 3 years ago
The internet is asynchronous, and requests take time. A sync request freezes your game server while it's being handled, causing lag. If a request times out, your server freezes for 30 seconds. Therefore, I will not implement them.
You just have to load the data OnPluginStart and not use it until it's loaded. If all goes well it shouldn't take long, and if it fails, you have to handle the data not being there anyway.
Is possiable make support for sync http reqeust? In some cases, it's useful. For example, I wanna a plugin load all data OnPluginStart.
before, we use SQL sync query to load items data. but sometimes sync query fail, I had to change to thread query. https://github.com/Kxnrl/Store
If we can make support for sync http request, will be helpful for such plugins.