-
February 9th, 2018, 11:07 PM
#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.
-
February 12th, 2018, 11:34 AM
#2
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.
-
February 12th, 2018, 02:11 PM
#3
Originally Posted by
DarioCrivelli
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?
-
February 13th, 2018, 08:39 AM
#4
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
-
By doraintech in forum General
Replies: 8
Last Post: May 21st, 2015, 03:13 PM
-
By snatarajan in forum Client SDKs
Replies: 11
Last Post: January 9th, 2013, 09:27 AM
-
By dalmy in forum Adapter SDKs
Replies: 1
Last Post: July 12th, 2010, 10:05 AM
-
By rsouissi in forum Adapter SDKs
Replies: 5
Last Post: December 13th, 2006, 08:42 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
-
Forum Rules
All times are GMT +1. The time now is 06:51 PM.
Bookmarks