0 Replies Latest reply on Jul 27, 2007 7:23 AM by _Mone

    URLStream connection kept open when IE7 closes the tab

    _Mone
      Hello all,

      I've encountered a problem using an URLStream object.

      Under IE7 if a tab containing a flash player that is downloading something with an URLStream is closed, sometimes the connection is kept alive until it's exhausted.

      I've prepared a little test-case to show the issue:

      public function test():void {
      var ur1:URLRequest = new URLRequest(myUrl);

      ur1.method = URLRequestMethod.POST;

      ur1.data = "LS_adapter=STOCKLISTDEMO&LS_content_length=3000&LS_mode1=MERGE&LS_window=0&LS_op=add&LS_ id1=item1 item2 item3 item4 item5 item6 item7 item8 item9 item10&LS_schema1=stock_name last_price time pct_change&LS_snapshot1=true";

      var cl:URLStream = new URLStream();

      cl.addEventListener(ProgressEvent.PROGRESS,ll);

      cl.load(ur1);

      }

      public function ll(evt:Event):void {
      ta.text += "k";
      }

      [the button on the demo calls the test method - the TextArea's id is ta - myUrl variable contains " http://push.lightstreamer.com/lightstreamer/create_session.txt" (I had problems with the forum's formatting) ]

      Due to domain restriction you have to install a Lightstreamer server to test it, or you can try the one deployed here: http://app.lightstreamer.com/_URLStreamTest/


      I've found a work-around but I don't like it very much as I have to capture browser's unload event to call the flash player to close the connection and then I've to show an alert, as the "close-call" sometimes is not enough.