                             {
 							    channel.dispatchEvent(MessageEvent.createEvent(MessageEvent.MESSAGE, message));
                             }
-                        } 
-						state = RESET_BUFFER_STATE; 	                                              
+                        }
+						state = RESET_BUFFER_STATE;
                     }
                     else // Wait for the rest of the chunk to arrive.
                     {

                    }
                    else // Wait for the rest of the chunk to arrive.
                    {
                        break;   
                    }
                }
                if (state == DATA_STATE)
                {                                       
                    if (chunkBuffer.bytesAvailable >= dataBytesToRead)
                    {                  
                        var message:IMessage = readMessage();
                        // Dispatch a message event from the channel.
                        // Prepare for the next chunk.                                        
                        if (message != null)
                        {
                            if ((message is AcknowledgeMessage) && (AcknowledgeMessage(message).correlationId == OPEN_COMMAND))

                    {
                        hexChunkSize += HEX_DIGITS[value];
                    }

                    if (chunkBuffer.bytesAvailable == 0)
                        break;
                }
                if (state == TEST_CHUNK_STATE)
                {
                    // A leading NULL byte in a chunk body indicates that the chunk should be read
                    // off the network but not processed further.
                    value = chunkBuffer.readByte();
                    dataOffset = chunkBuffer.position;
                    state = (value == NULL_BYTE) ? SKIP_STATE :
                                                   DATA_STATE;
                    chunkBuffer.position--;

                    if (chunkBuffer.bytesAvailable == 0)
                        break;
                }
                if (state == SKIP_STATE)
                {
                    if (chunkBuffer.bytesAvailable >= dataBytesToRead)
                    {
                        chunkBuffer.position += dataBytesToRead; // Skip over all bytes for the chunk.
