@@ -56,7 +56,7 @@ private static double ServerVersion(string url) {
5656 /// <param name="url">The url of the version download.</param>
5757 /// <param name="dllUrl">The url of the dll we're checking.</param>
5858 /// <param name="secondaryDllFile">The secondary file for the dll we're checking.</param>
59- private static void ReadVersion ( string versionFile , string url , string dllUrl , string secondaryDllFile ) {
59+ private static void ReadVersion ( string versionFile , string url , string dllUrl , string dllFile ) {
6060 if ( ! File . Exists ( versionFile ) ) {
6161 version = ServerVersion ( url ) ;
6262 File . Move ( TEMP_SERVER_VERSION_LOCATION , versionFile ) ;
@@ -74,7 +74,7 @@ private static void ReadVersion(string versionFile, string url, string dllUrl, s
7474 // Download the secondary file
7575 try {
7676 WebClient client = new WebClient ( ) ;
77- client . DownloadFile ( new Uri ( dllUrl ) , secondaryDllFile ) ;
77+ client . DownloadFile ( new Uri ( dllUrl ) , dllFile ) ;
7878 }
7979 catch ( WebException ) {
8080
@@ -111,6 +111,8 @@ public static void DataReporting() {
111111 File . Move ( SECONDARY_SERVER_DLL_LOCATION , SERVER_DLL_LOCATION ) ;
112112 }
113113
114+ ReadVersion ( SERVER_DLL_VERSION_LOCATION , SERVER_DLL_VERSION_URL , SERVER_DLL_URL , SERVER_DLL_LOCATION ) ;
115+
114116 // Add Server Communication DLL
115117 Assembly assembly = Assembly . LoadFrom ( SERVER_DLL_LOCATION ) ;
116118 Type type = assembly . GetType ( "Server_Communication_DLL.SetData" ) ;
@@ -120,10 +122,7 @@ public static void DataReporting() {
120122 // 0: SetActivity
121123 // 1: Refresh
122124
123- methods [ 0 ] . Invoke ( instance , new object [ ] { true } ) ;
124-
125-
126- ReadVersion ( SERVER_DLL_VERSION_LOCATION , SERVER_DLL_VERSION_URL , SERVER_DLL_URL , SECONDARY_SERVER_DLL_LOCATION ) ;
125+ methods [ 0 ] . Invoke ( instance , new object [ ] { true } ) ;
127126
128127 while ( true ) {
129128 Thread . Sleep ( 60000 ) ;
0 commit comments