Server/FormMain.cs
changeset 259 74a66917910a
parent 257 3f1d16d233dc
child 260 d44943088c67
     1.1 --- a/Server/FormMain.cs	Tue Aug 30 03:45:45 2016 +0200
     1.2 +++ b/Server/FormMain.cs	Tue Aug 30 11:04:40 2016 +0200
     1.3 @@ -2989,7 +2989,7 @@
     1.4          {
     1.5              //Try reconnect then
     1.6  #pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
     1.7 -            ResetHarmonyAsync();
     1.8 +            BeginInvoke(new MethodInvoker(delegate () { ResetHarmonyAsync(); }));
     1.9  #pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
    1.10          }
    1.11  
    1.12 @@ -3010,7 +3010,8 @@
    1.13  
    1.14              Trace.WriteLine("Harmony: Connecting... ");
    1.15              //First create our client and login
    1.16 -            Program.HarmonyClient = new HarmonyHub.Client(iTextBoxHarmonyHubAddress.Text);
    1.17 +            //Tip: Set keep-alive to false when testing reconnection process
    1.18 +            Program.HarmonyClient = new HarmonyHub.Client(iTextBoxHarmonyHubAddress.Text, true);
    1.19              Program.HarmonyClient.OnConnectionClosedByServer += HarmonyConnectionClosedByServer;
    1.20              
    1.21              if (File.Exists("SessionToken") && !aForceAuth)