RTC Forums
January 23, 2018, 05:01:03 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Delayed call preventing application termination  (Read 117 times)
DPerkins
RTC License+
****
Posts: 20


« on: January 09, 2018, 06:34:24 PM »

I've just added delayed calls to our client application to enable the server to push events to the client.  It works well.

When I exit my client application, I call:

   TRtcHttpClient->DisconnectNow()

...prior to deleting the dynamically created RTC components.  If I call the above on the TRtcHttpClient that I use for delayed calls, then the application hangs. 

Is calling DisconnectNow() the correct procedure prior to deletion and if so, is there anything that can be called to prevent the hang when called on a RtcHttpClient with a delayed call in progress?

Using 7.62.

Thanks
Logged
Danijel Tkalcec
Administrator
*****
Posts: 1629


« Reply #1 on: January 09, 2018, 06:49:13 PM »

When using Delayed Calls, you will most likely have a request waiting for a response from the Server. If you do NOT want to wait for that response from the Server before you start closing the connection, you should call DisconnectNow(TRUE) to skip all pending requests and start closing the connection immediately, instead of waiting for all pending requests to finish before a connection is closed.

Here are all "DisconnectNow" method parameters, with their default values ...
( SkipPendingRequests:boolean=False;
  _Timeout:cardinal=0;
  UserInteractionAllowed:boolean=False;
  AllowMessageProcessing:boolean=True )

Best Regards,
Danijel Tkalcec
Logged
DPerkins
RTC License+
****
Posts: 20


« Reply #2 on: January 10, 2018, 11:20:22 AM »

Great, thanks.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.041 seconds with 16 queries.