Results 1 to 4 of 4
  1. #1

    .NET PCL Client Connection Loss Handling

    Hi, I'm struggling to figure out the proper way to "reconnect" to a 3rd party Lightstreamer if a connection loss occurs.

    In my connection listener, I respond to the OnFailure events. When this happens, I attempt to call UnsubscrbeTable for any table keys we have open. Then I call CloseConnection on the client.

    I then create a new instance of the client, get a new session token from our third party, and OpenConnection. This works as expected.

    It's only when I attempt to call SubscribeTable that I run into trouble. These calls always block indefinitely, and I'm unable to get any timeout to work or understand what the underlying issue is. If I restart the application and connect normally, everything works fine.

    Any idea how to chase this down? I'm sure it's something I'm doing incorrectly, I just don't know how to go about figuring out what that something is.

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,090
    Hi,
    We can't find any obvious explaination.
    Can you manage to take a thread dump of the client process while it is blocked?

    Note that when you receive OnFailure you don't need to explicitly unsubscribe and disconnect. Perhaps saving this part could simplify the case.

    About timeouts, you are right. I suppose that you have followed the instructions in the OpenConnection documentation, but unfortunately the documentation seems wrong as, currently, the library doesn't support timeouts. This was a feature of the previous .NET client SDK that we still have to reintroduce in the .NET PCL SDK. We plan to do that in the short term.

  3. #3
    Quote Originally Posted by DarioCrivelli View Post
    Note that when you receive OnFailure you don't need to explicitly unsubscribe and disconnect. Perhaps saving this part could simplify the case.
    In this case, would I simply need to re-subscribe then?

  4. #4
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,090
    Yes, reconnect and resubscribe.
    The PCL SDK, unlike others, doesn't offer any automatic recovery.
    Hence, upon session interruption, the application should restart from scratch, by initiating a new session and resubmitting the subscriptions.

 

 

Similar Threads

  1. Handling client update when snapshot not present
    By doraintech in forum General
    Replies: 8
    Last Post: May 21st, 2015, 04:13 PM
  2. Replies: 11
    Last Post: January 9th, 2013, 10:27 AM
  3. Replies: 1
    Last Post: July 12th, 2010, 11:05 AM
  4. Replies: 5
    Last Post: December 13th, 2006, 09:42 AM

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 06:55 PM.