You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
This is a rare bug. I only found it in asa, but I dont know if it could happen with other games.
When doing a query to the epicgames api, it returns an array with the game servers in that IP. But sometimes, it may return one game server duplicated. But the difference is that the duplicate server total player count is "1" and I believe the game server id is different too.
Steps To Reproduce
I made my own library to query ark servers in a larger scale and save all ark servers info. Doing this is when I noticed, that sometimes we would get a duplicate server in the servers array and the wrong one would be the one with total player count 1.
As I had my own library, I went to ask a friend who used gamedig, and he told me he was having this issue every now and then, and he would just query the server again and again until he would be returned a server with a different player count than 1. But the correct one would be returned when the duplicated disappeared, or the find function would return the "correct" one.
So I noticed this by doing thousands of queries and checking the server object we would get from the epic games api.
Expected behavior
I ended up finding a "temporal" solution, as I dont know if a wrong game server object could happen even when a server is offline.
The duplicated server would be wrong as it would always show player count 1, so I ended up thinking, if there is more than 1 server with the same port, then we can get the one that player count is not 1.
But I say this is a temporal solution, as I dont know if I can get a player count 1, even when the game server is offline.
I want to shout out to cainthebest for making my fix much more cleaner and optimized. But as I mention above, I dont know if we can get this issue when the server is offline that would make us believe the server is online.
constallMatchingSessions=response.sessions.filter(hasDesiredPort);constdesiredServer=allMatchingSessions.length>1
? allMatchingSessions.find(session=>session.totalPlayers!==1)||allMatchingSessions[0]
: allMatchingSessions[0]||null;if(!desiredServer){thrownewError('Server not found');}
The text was updated successfully, but these errors were encountered:
Describe the bug
This is a rare bug. I only found it in asa, but I dont know if it could happen with other games.
When doing a query to the epicgames api, it returns an array with the game servers in that IP. But sometimes, it may return one game server duplicated. But the difference is that the duplicate server total player count is "1" and I believe the game server id is different too.
Steps To Reproduce
I made my own library to query ark servers in a larger scale and save all ark servers info. Doing this is when I noticed, that sometimes we would get a duplicate server in the servers array and the wrong one would be the one with total player count 1.
As I had my own library, I went to ask a friend who used gamedig, and he told me he was having this issue every now and then, and he would just query the server again and again until he would be returned a server with a different player count than 1. But the correct one would be returned when the duplicated disappeared, or the find function would return the "correct" one.
So I noticed this by doing thousands of queries and checking the server object we would get from the epic games api.
Expected behavior
I ended up finding a "temporal" solution, as I dont know if a wrong game server object could happen even when a server is offline.
The duplicated server would be wrong as it would always show player count 1, so I ended up thinking, if there is more than 1 server with the same port, then we can get the one that player count is not 1.
But I say this is a temporal solution, as I dont know if I can get a player count 1, even when the game server is offline.
I want to shout out to cainthebest for making my fix much more cleaner and optimized. But as I mention above, I dont know if we can get this issue when the server is offline that would make us believe the server is online.
The text was updated successfully, but these errors were encountered: