RTC Forums

Subscription => Support => Topic started by: mkurnia on November 16, 2015, 10:02:47 AM



Title: client requests sent twice
Post by: mkurnia on November 16, 2015, 10:02:47 AM
hi danijel,

how to prevent the client sends a request twice, I accidentally found it. when I press the OK button on the client application, it turns abruptly interrupted connection with the server. then I click the OK button again, and it turns out that the first click is still ongoing. when I click the OK button for the second time it turns out that the client application sent again to the same record. there are two records sent to the server.


Title: Re: client requests sent twice
Post by: D.Tkalcec (RTC) on November 16, 2015, 10:11:32 AM
Requests aren't sent to the Server immediately, but are first placed into a Request Queue, where they will stay until you have a connection open to the Server, so they can be sent out when the Server is accessible. If you want to clear the Request Queue (to make sure there are no requests waiting to be sent), you can use the SkipRequests (does NOT trigger RequestAborted events) or CancelRequests (triggers RequestAborted events for all cancelled requests) method on the TRtcHttpClient component.

Best Regards,
Danijel Tkalcec


Title: Re: client requests sent twice
Post by: mkurnia on November 17, 2015, 01:20:19 AM
Danijel thank you, I've been using suggestions from you. so far successfully used this way.