Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2010

    Smile Track the Server disconnection

    I am working on Java Web application using Light Streamer.
    I am trying to track the LS disconnection on My Web Page with the following code.

    engine.onStatusChange = function(chngStatus)
    if (chngStatus == "DISCONNECTED") {
    alert("Status : " + chngStatus);

    if (chngStatus == "STALLED") {
    alert("Status : " + chngStatus);
    But this event is fired while closing LS as well as browser (Page). But I want to track LS disconnection on the above.

    What i missed there? Or is there any other way to track the same.
    Thanks in advance.

  2. #2
    Power Member
    Join Date
    Jul 2006
    Cesano Maderno, Italy
    when you close the browser or the server the client actually disconnects, that's why the onStatusChange is called.

    also STALLED is not the same as DISCONNECTED as the former can just be caused by a delay in the network

    you may want to also listen to the onEngineLost event as a lost engine also means "no connection available"

    finally I see that you want to reload the page when your client disconnects. May I ask you why? Are you experiencing any problem that lead you to take this approach?



Similar Threads

  1. Handling disconnection of lightstreamer.
    By Sathyaayyanar in forum Adapter SDKs
    Replies: 5
    Last Post: June 26th, 2015, 09:49 AM
  2. disconnection problems
    By magnum_rg in forum Client SDKs
    Replies: 5
    Last Post: August 12th, 2011, 10:43 AM
  3. Client Server Disconnection Notification
    By vaduganathan in forum Adapter SDKs
    Replies: 1
    Last Post: May 28th, 2010, 10:34 AM
  4. Security patterns: Forcing disconnection
    By churrusco in forum General
    Replies: 15
    Last Post: April 20th, 2010, 09:46 AM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
All times are GMT +1. The time now is 07:14 AM.