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( steam3 = new Steam3Session(
new SteamUser.LogOnDetails() new SteamUser.LogOnDetails()
@ -308,10 +308,11 @@ namespace DepotDownloader
if (!steam3Credentials.IsValid) if (!steam3Credentials.IsValid)
{ {
Console.WriteLine("Unable to get steam3 credentials."); Console.WriteLine("Unable to get steam3 credentials.");
return; return false;
} }
cdnPool = new CDNClientPool(steam3); cdnPool = new CDNClientPool(steam3);
return true;
} }
public static void ShutdownSteam3() public static void ShutdownSteam3()

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

Loading…
Cancel
Save