title: OnSubscriptionError EWS double subscription
body: <p>I am connecting to Exchange 2013 hosted on cloud and registering for streaming notifications using EWS (Exchange web service api). The issue is, at any random time, subscription throws error and i am handing OnSubscriptionError event. Here, i am removing all subscriptions and closing connection and connecting again.</p>
  
  <p>As my connection and subscription is set, application start receiving multiple events. It looks like a case of double streaming subscription connection.</p>
  
  <p>What is the best way to re-establish connection from point when OnSubscriptionError is fired?
  Is there any way to see what causing OnSubscriptionError event to fire on Exchange side?</p>
  
  <pre><code>static void OnError(object sender, SubscriptionErrorEventArgs args)
          {
              // Handle error conditions.  
              Exception e = args.Exception;
              CustomLogger.WriteErrorLog(String.Format("In OnError: " + Environment.NewLine + " Message:{0} " + Environment.NewLine + "Exception Message:{1} " + Environment.NewLine + "Inner Exception:{2} " + Environment.NewLine + "Source:{3} " + Environment.NewLine + "Stack Trace{4}",
                                                      ErrorMessages.GeneralError, e.Message, e.InnerException, e.Source, e.StackTrace), drawLines: true);
              StreamingSubscriptionConnection connection = null;
  
              if (args.Subscription != null)
              {
                  CustomLogger.WriteErrorLog(Messages.UnSubscribeToNotifications);
                  try
                  {
                      connection = (StreamingSubscriptionConnection)sender;
                      connection.RemoveSubscription(args.Subscription);
                  }
                  catch
                  {
                  }
                  CustomLogger.WriteErrorLog(Messages.UnSubscribedToNotifications);
              }
              if (connection != null &amp;&amp; connection.IsOpen) connection.Close();
  
              ReConnectAndSubscribe();
          }
  </code></pre>