internal void OnConnected(PhysicalConnection connection, TextWriter log) { Trace("OnConnected"); if (physical == connection && !isDisposed && ChangeState(State.Connecting, State.ConnectedEstablishing)) { ServerEndPoint.OnEstablishing(connection, log); } else { try { connection.Dispose(); } catch { } } }
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 { } } }