Abort main flow if we can't connect after STEAM3_TIMEOUT seconds

pull/25/head
Ryan Kistner 10 years ago
parent bdfd56b482
commit 9b778c374e

@ -293,7 +293,7 @@ namespace DepotDownloader
}
}
public static void InitializeSteam3(string username, string password)
public static bool InitializeSteam3(string username, string password)
{
steam3 = new Steam3Session(
new SteamUser.LogOnDetails()
@ -308,10 +308,11 @@ namespace DepotDownloader
if (!steam3Credentials.IsValid)
{
Console.WriteLine("Unable to get steam3 credentials.");
return;
return false;
}
cdnPool = new CDNClientPool(steam3);
return true;
}
public static void ShutdownSteam3()

@ -108,9 +108,11 @@ namespace DepotDownloader
Console.WriteLine("No username given. Using anonymous account with dedicated server subscription.");
}
ContentDownloader.InitializeSteam3(username, password);
ContentDownloader.DownloadApp(appId, depotId, branch, forceDepot);
ContentDownloader.ShutdownSteam3();
if (ContentDownloader.InitializeSteam3(username, password))
{
ContentDownloader.DownloadApp(appId, depotId, branch, forceDepot);
ContentDownloader.ShutdownSteam3();
}
}
static int IndexOfParam( string[] args, string param )

Loading…
Cancel
Save