예제 #1
0
 internal virtual bool Rebind(ActivityController activityController)
 {
     activityController.StartConnection();
     try
     {
         this.localPushServerProxy.ResyncSession();
         return(true);
     }
     catch (PushServerException exception)
     {
         protLogger.Debug("Error in rebinding to the session", exception);
         sessionLogger.Error("Error while trying to rebind to session " + this.localPushServerProxy.SessionId);
         this.serverListener.OnFailure(exception);
     }
     catch (PushConnException exception2)
     {
         streamLogger.Debug("Error in connection", exception2);
         sessionLogger.Error("Error while trying to rebind to session " + this.localPushServerProxy.SessionId);
         this.serverListener.OnFailure(exception2);
     }
     catch (PhaseException)
     {
         sessionLogger.Info("Listening loop closed for session " + this.localPushServerProxy.SessionId);
     }
     finally
     {
         activityController.StopConnection();
     }
     return(false);
 }
예제 #2
0
 internal virtual bool Rebind(ActivityController activityController)
 {
     activityController.StartConnection(false);
     try
     {
         this.localPushServerProxy.ResyncSession();
         return true;
     }
     catch (PushEndException e)
     {
         streamLogger.Debug("Forced connection end", e);
         sessionLogger.Error("Connection forcibly closed by the Server while trying to rebind to session " + this.localPushServerProxy.SessionId);
         this.serverListener.OnEnd(e.EndCause);
     }
     catch (PushServerException e)
     {
         protLogger.Debug("Error in rebinding to the session", e);
         sessionLogger.Error("Error while trying to rebind to session " + this.localPushServerProxy.SessionId);
         this.serverListener.OnFailure(e);
     }
     catch (PushConnException e)
     {
         streamLogger.Debug("Error in connection", e);
         sessionLogger.Error("Error while trying to rebind to session " + this.localPushServerProxy.SessionId);
         this.serverListener.OnFailure(e);
     }
     catch (PhaseException)
     {
         sessionLogger.Info("Listening loop closed for session " + this.localPushServerProxy.SessionId);
     }
     finally
     {
         activityController.StopConnection();
     }
     return false;
 }