I have a REST Server
with an Android Client
, both on Deplhi Xe5
The android client succesfully connects with the Rest server. In my server I have a TDSHttpWebDispatcher
with SessionTimeout
=1200000 (20 min)
So when the user in android doesn't use the app for more than 20 min, gets the "Session has expired" error when do a request to the REST server.
I already set the PresserveSessionId=False
in the DSRestConnection
in the Client app, so there is no sessiontimeout error, but it makes the app slower, because for every request to the REST server it creates a new session.
I wanna keep the PresserveSessionId=True
for better performance, and when the session expires (after 20 min) catch the "Session has expired" error and request for a new session for the client
How can i achieve that?
Thanks
Sorry for my english!, hope it is readable
There is an open QC report on this here . The obvious work around would be to create a Try..Except
block on each call and on that specific exception request a new session.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.