Results 1 to 4 of 4
  1. #1

    If wifi/network is disconnected and re-connected, re-initializing LS conn hangs[OS X]

    We are using LS client for OSX.
    - If network/wifi goes off in middle of a session we get connection closed event
    - Once network is available again, we try to do the connection again
    -- We 1st call unsubscribeItems on previous connection
    -- Then call closeConnection
    -- Re-initialize new connection

    Here on calling "unsubscribeItems" application just hangs. This is turning out to be a critical issue for us to handle. Any quick help would be appreciated.

    Thanks,
    Vedang Purohit
    Intralinks Inc.

  2. #2
    Administrator
    Join Date
    Feb 2012
    Location
    Bologna, Italy
    Posts
    102
    Hello,

    the OS X client, just like iOS client, monitors the network status and is able to automatically reconnect in case of connection loss. You may try it with the sample application: open it and switch off then on the wi-fi adapter, the app will reconnect automatically. You may see from the app's sources that there is no code handling the reconnection in the clientConnection:didReceiveConnectionFailure: and clientConnection:didReceiveServerFailure: events, it is automatic. Our advice is to use the automatic reconnection whenever is possible.

    Also, be sure to update your OS X client library to the latest version, 1.0.2 build 4.8, included in the latest Lightstreamer Server distribution. It contains many important bug fixes and documentation fixes. The updated documentation home page contains an improved explanation of the automatic reconnection mechanism, see there for more information.

    Hope this helps.
    Best regards,

    Gianluca
    Last edited by gianluca.bertani; February 8th, 2014 at 12:27 AM.

  3. #3
    Here is sample code we are using for connection -


    [LSConnectionInfo connectionInfoWithPushServerURL:[ILDefaults pushServerURL]
    pushServerControlURL:nil
    user:[ILDefaults globalSessionId]
    password:nil
    adapter:@"IL"];


    As you can see above that we are using our session (which can change/expire after 60 minutes) for user name. This was required because we had to bridge push server connection with our core server. Now whenever session expires we'll have to reconnect with LS/Push server again with a new session. In this case do we still need to call "unsubscribe items" and then open connection again or simply open connection.


    We also tried updating to the newest library but we are still not getting notifications on re-connection.


    Right now this is quite an escalated issue since it is holding a release. Can we get on a phone call to discuss it further.


    Thanks,
    Vedang Purohit
    Intralinks Inc.

  4. #4
    Administrator
    Join Date
    Feb 2012
    Location
    Bologna, Italy
    Posts
    102
    Hello again,

    when your session expires, it is enough to call a closeConnection and then open the new connection appropriately. There's no need to unsubscribe all tables first, they will be cleared together with the connection. Recall that such calls should not be done on the thread of an LSConnectionDelegate event, but rather on on a separate background thread.

    We still recommend to rely on the OS X client automatic resubscription for situations where the connection drops for external reasons. If you can't distinguish the two situations (session expiration vs. connection drop) then forcibly close the connection in both cases, by spawing a closeConnection call during the appropriate LSConnectionDelegate event, as explained on the home page of the OS X documentation.

    Anyway, we are available for a phone or Skype call to discuss the issue further. Please contact support so it can be scheduled with the people involved.
    Best regards,

    Gianluca

 

 

Similar Threads

  1. Network disconnected at client side
    By mhasan in forum Client SDKs
    Replies: 1
    Last Post: June 25th, 2015, 10:40 AM
  2. Long wait on CONNECTED:STREAM-SENSING in firefox
    By kpturner in forum Client SDKs
    Replies: 12
    Last Post: December 20th, 2012, 11:26 AM
  3. How to disconnect a connected session from MetaAdapter?
    By LS_Developer in forum Adapter SDKs
    Replies: 2
    Last Post: April 19th, 2011, 12:03 PM
  4. Streaming system is disconnected
    By ivailo in forum Client SDKs
    Replies: 2
    Last Post: December 1st, 2009, 01:07 PM
  5. LS thread hangs on process exit
    By bartol82 in forum Adapter SDKs
    Replies: 3
    Last Post: October 20th, 2008, 03:01 PM

Bookmarks

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 03:15 PM.