RTC Forums
November 23, 2024, 04:57:29 PM *
Welcome, Guest. Please login or register.

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


« 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
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« 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: 37


« 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.023 seconds with 17 queries.