 		private var _expectedChallengeResponse:String;
 		private var _fragment:WebSocketFrame;
 		private var _emptyBufferTimeout:int;
+		private var _openingHandshakeTimeout:int;
 		private var _closingHandshakeTimeout:int;
 		
 		private var _secure:Boolean;

		private function closeConnection():void {
			Debugger.log("closeConnection");
			
			clearTimeout(_closingHandshakeTimeout);
			
			if (_socket.connected) {

			
			_socket.writeUTFBytes(headers.join('\r\n'));
			_socket.flush();
			
			_openingHandshakeTimeout = setTimeout(closeConnection, 20000);
		}
		
		private function readHttpHeader(buffer:ByteArray):String {
