mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-25 06:05:46 +03:00
Put all servers that failed to respond to the query into a "Unqueried" list intead of "Unresponsive"
This commit is contained in:
parent
4463739be5
commit
f8960c8971
@ -69,6 +69,27 @@ public async Task ServerListInternet()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Used to reproduce steam serverlist stopping querying after ~10s around august 2023
|
||||||
|
[TestMethod]
|
||||||
|
public async Task RustServerListTest()
|
||||||
|
{
|
||||||
|
using ( var list = new ServerList.Internet() )
|
||||||
|
{
|
||||||
|
list.AddFilter( "secure", "1" );
|
||||||
|
list.AddFilter( "and", "1" );
|
||||||
|
list.AddFilter( "gametype", "v2405" );
|
||||||
|
list.AddFilter( "appid", "252490" );
|
||||||
|
list.AddFilter( "gamedir", "rust" );
|
||||||
|
list.AddFilter( "empty", "1" );
|
||||||
|
|
||||||
|
var success = await list.RunQueryAsync( 90 );
|
||||||
|
|
||||||
|
Console.WriteLine( $"success {success}" );
|
||||||
|
Console.WriteLine( $"Found {list.Responsive.Count} Responsive Servers" );
|
||||||
|
Console.WriteLine( $"Found {list.Unresponsive.Count} Unresponsive Servers" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public async Task SourceQuery()
|
public async Task SourceQuery()
|
||||||
{
|
{
|
||||||
|
@ -41,6 +41,7 @@ public abstract class Base : IDisposable
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public List<ServerInfo> Unresponsive = new List<ServerInfo>();
|
public List<ServerInfo> Unresponsive = new List<ServerInfo>();
|
||||||
|
|
||||||
|
public List<ServerInfo> Unqueried = new List<ServerInfo>();
|
||||||
|
|
||||||
public Base()
|
public Base()
|
||||||
{
|
{
|
||||||
@ -176,8 +177,10 @@ void MovePendingToUnresponsive()
|
|||||||
{
|
{
|
||||||
watchList.RemoveAll( x =>
|
watchList.RemoveAll( x =>
|
||||||
{
|
{
|
||||||
var info = Internal.GetServerDetails( request, x );
|
var details = Internal.GetServerDetails( request, x );
|
||||||
OnServer( ServerInfo.From( info ), info.HadSuccessfulResponse );
|
var info = ServerInfo.From( details );
|
||||||
|
info.Ping = int.MaxValue;
|
||||||
|
Unqueried.Add( info );
|
||||||
return true;
|
return true;
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
@ -194,4 +197,4 @@ private void OnServer( ServerInfo serverInfo, bool responded )
|
|||||||
Unresponsive.Add( serverInfo );
|
Unresponsive.Add( serverInfo );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user