internal void OnFullyEstablished(PhysicalConnection connection)
        {
            Trace("OnFullyEstablished");
            connection?.SetIdle();
            if (physical == connection && !isDisposed && ChangeState(State.ConnectedEstablishing, State.ConnectedEstablished))
            {
                reportNextFailure = reconfigureNextFailure = true;
                LastException     = null;
                Interlocked.Exchange(ref failConnectCount, 0);
                ServerEndPoint.OnFullyEstablished(connection);

                bool createWorker;
                lock (_backlog) // do we have pending system things to do?
                {
                    createWorker = _backlog.Count != 0;
                }
                if (createWorker)
                {
                    StartBacklogProcessor();
                }

                if (ConnectionType == ConnectionType.Interactive)
                {
                    ServerEndPoint.CheckInfoReplication();
                }
            }
            else
            {
                try { connection.Dispose(); } catch { }
            }
        }
 internal void OnFullyEstablished(PhysicalConnection connection)
 {
     Trace("OnFullyEstablished");
     if (physical == connection && !isDisposed && ChangeState(State.ConnectedEstablishing, State.ConnectedEstablished))
     {
         reportNextFailure = reconfigureNextFailure = true;
         Interlocked.Exchange(ref failConnectCount, 0);
         serverEndPoint.OnFullyEstablished(connection);
         multiplexer.RequestWrite(this, true);
     }
     else
     {
         try { connection.Dispose(); } catch { }
     }
 }
Exemplo n.º 3
0
 internal void OnFullyEstablished(PhysicalConnection connection)
 {
     Trace("OnFullyEstablished");
     if (physical == connection && !isDisposed && ChangeState(State.ConnectedEstablishing, State.ConnectedEstablished))
     {
         reportNextFailure = reconfigureNextFailure = true;
         LastException     = null;
         Interlocked.Exchange(ref failConnectCount, 0);
         ServerEndPoint.OnFullyEstablished(connection);
         Multiplexer.RequestWrite(this, true);
         if (ConnectionType == ConnectionType.Interactive)
         {
             ServerEndPoint.CheckInfoReplication();
         }
     }
     else
     {
         try { connection.Dispose(); } catch { }
     }
 }
Exemplo n.º 4
0
        internal void OnFullyEstablished(PhysicalConnection connection)
        {
            Trace("OnFullyEstablished");
            connection?.SetIdle();
            if (physical == connection && !isDisposed && ChangeState(State.ConnectedEstablishing, State.ConnectedEstablished))
            {
                reportNextFailure = reconfigureNextFailure = true;
                LastException     = null;
                Interlocked.Exchange(ref failConnectCount, 0);
                ServerEndPoint.OnFullyEstablished(connection);
#pragma warning disable CS0618
                WritePendingBacklogSync(connection);
#pragma warning restore CS0618

                if (ConnectionType == ConnectionType.Interactive)
                {
                    ServerEndPoint.CheckInfoReplication();
                }
            }
            else
            {
                try { connection.Dispose(); } catch { }
            }
        }