                 internalConnect();
             }
         }
-	}
-
-	/**
-	 *  Disconnects the ChannelSet from the Channel. If the Channel is connected
-	 *  to its endpoint and it has no more connected ChannelSets it will 
-	 *  internally disconnect.
-	 *
-	 *  <p>Channel subclasses need to override the 
-	 *  <code>internalDisconnect()</code> method, and call the
-	 *  <code>disconnectSuccess()</code> method when the underlying connection
-	 *  has been terminated.</p>
-	 * 
-	 *  @param channelSet The ChannelSet to disconnect from the Channel.
-	 */
-	final public function disconnect(channelSet:ChannelSet):void
-	{
-	    // If we own the wait guard for initial Channel connects release it.
-	    // This will only be true if this Channel is the first to attempt to connect
-	    // but its connect attempt is still pending when disconnect() is invoked.
-	    if (_ownsWaitGuard)
-	    {
-	        _ownsWaitGuard = false;
-	        FlexClient.getInstance().waitForFlexClientId = false; // Allow other Channels to connect.
-	    }
-	    
-	    // Disconnect the channelSet.
-	    var i:int = channelSet != null ? _channelSets.indexOf(channelSet) : -1;
+    }
+
+    /**
+     *  Disconnects the ChannelSet from the Channel. If the Channel is connected
+     *  to its endpoint and it has no more connected ChannelSets it will
+     *  internally disconnect.
+     *
+     *  <p>Channel subclasses need to override the
+     *  <code>internalDisconnect()</code> method, and call the
+     *  <code>disconnectSuccess()</code> method when the underlying connection
+     *  has been terminated.</p>
+     *
+     *  @param channelSet The ChannelSet to disconnect from the Channel.
+     */
+    final public function disconnect(channelSet:ChannelSet):void
+    {
+        // If we own the wait guard for initial Channel connects release it.
+        // This will only be true if this Channel is the first to attempt to connect
+        // but its connect attempt is still pending when disconnect() is invoked.
+        if (_ownsWaitGuard)
+        {
+            _ownsWaitGuard = false;
+            FlexClient.getInstance().waitForFlexClientId = false; // Allow other Channels to connect.
+        }
+
+        // Disconnect the channelSet.
+        var i:int = channelSet != null ? _channelSets.indexOf(channelSet) : -1;
         if (i != -1)
         {
             _channelSets.splice(i, 1);
             // Remove the ChannelSet as a listener to this Channel.
             removeEventListener(ChannelEvent.CONNECT, channelSet.channelConnectHandler, false);
-            removeEventListener(ChannelEvent.DISCONNECT, channelSet.channelDisconnectHandler, false);                
+            removeEventListener(ChannelEvent.DISCONNECT, channelSet.channelDisconnectHandler, false);
             removeEventListener(ChannelFaultEvent.FAULT, channelSet.channelFaultHandler, false);
-            
-            // Notify the ChannelSet of the disconnect.                
-            if (connected) 
-            {    
+
+            // Notify the ChannelSet of the disconnect.
+            if (connected)
+            {
                 channelSet.channelDisconnectHandler(ChannelEvent.createEvent(ChannelEvent.DISCONNECT, this, false));
             }
-        
-    	    // Shut down the underlying connection if this Channel has no more 
-    	    // ChannelSets using it.
+
+            // Shut down the underlying connection if this Channel has no more
+            // ChannelSets using it.
             if (_channelSets.length == 0)
             {
                 _shouldBeConnected = false;


    /**
     * Channel property determines the level of performance information injection - whether
     * we inject timestamps or not. 
     */
    public function get recordMessageTimes():Boolean
    {
    	return _recordMessageTimes;
    }	

	//----------------------------------    
	//  recordMessageSizes
	//----------------------------------
	    
    /**
     * @private
     */

 */
class AuthenticationMessageResponder extends MessageResponder
{
    //--------------------------------------------------------------------------
    //
    // Constructor
    //
    //--------------------------------------------------------------------------

    public function AuthenticationMessageResponder(agent:MessageAgent,
                                message:IMessage, channel:Channel, log:ILogger)
    {
        super(agent, message, channel);
        _log = log;
    }

    //--------------------------------------------------------------------------
    //
    // Variables
    //
    //--------------------------------------------------------------------------

    /**
     *  @private
     *  Reference to the logger for the associated Channel.
     */
    private var _log:ILogger;

    //--------------------------------------------------------------------------
    //
    // Methods
    //
    //--------------------------------------------------------------------------

    /**
     *  Handles an authentication result.
     *
     *  @param msg The result Message.
     */
    override protected function resultHandler(msg:IMessage):void
