Title: Delayed call preventing application termination Post by: DPerkins 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 Title: Re: Delayed call preventing application termination Post by: D.Tkalcec (RTC) 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 Title: Re: Delayed call preventing application termination Post by: DPerkins on January 10, 2018, 11:20:22 AM Great, thanks.
|