Title: DisconnectNow(True) hang my app Post by: ISIGest on May 17, 2016, 11:15:59 AM I try to disconnect and reconnect with RtcHttpClient but if I try to call DisconnectNow(True) (or DisconnectNow(false)) the method hang waiting for terminate...but the connection isClosing = true.
There is another method to force closing connection? Title: Re: DisconnectNow(True) hang my app Post by: D.Tkalcec (RTC) on May 17, 2016, 12:03:46 PM Can you send me a simple example Project which demonstrates your problem?
(http://www.realthinclient.com/supportmail.gif) In the E-Mail, please include instructions to reproduce the problem, the Delphi version used to compile the Project and the target platform where this happens. Best Regards, Danijel Tkalcec Title: Re: DisconnectNow(True) hang my app Post by: ISIGest on May 17, 2016, 01:43:19 PM Now I solved by calling only Disconnect() thank you
Title: Re: DisconnectNow(True) hang my app Post by: D.Tkalcec (RTC) on May 17, 2016, 02:02:18 PM Good.
It is better to use "Disconnect" if you plan to open the connection again. Also, because the "Disconnect" method only signals the component to close the connection, but does NOT wait for the connection to be closed, "Disconnect" method can be used from anywhere, including RTC events triggered by the component. The "DisconnectNow" method, on the other hand, waits for all RTC events triggered by the component to finish and for the connection to close before continuing, because of which you should NOT use "DisconnectNow" from inside any RTC event triggered by the component, since that would result in an endless loop and is most likely the reason why your Application "hanged". Best Regards, Danijel Tkalcec |