tufanv Expert Licensed User Longtime User May 27, 2017 #1 Hello, I have started to use 2 servers for my finance app , one is the cps and other one is my home server for testing purposes. What I am trying to achieve is first try my home server if homeserver is not online continue with the vps . I use this code under jobdone's if job.success=false : Code: Copy If aktifserver=homeserver Then aktifserver=roseserver Else aktifserver=homeserver End If aktifserver is a string for the url which httpjob uses with : Code: Copy Dim connection As HttpJob connection.Initialize("getir",Me) connection.PostString(aktifserver,"action=getir&paket="&GetAppName) so if the job fails active server changes to other one for further tries . Homeserver is set to be tried first with app launch. My problem is , when i disconnect my homeserver from the internet and launch my app , my app first tries my home server but before it gets the job fail : JobName = getir, Success = false it takes too much time like 20-30 seconds so that it continues to other one . I need about 3-4 second at most to switch the servers . How can i achieve this ? TY
Hello, I have started to use 2 servers for my finance app , one is the cps and other one is my home server for testing purposes. What I am trying to achieve is first try my home server if homeserver is not online continue with the vps . I use this code under jobdone's if job.success=false : Code: Copy If aktifserver=homeserver Then aktifserver=roseserver Else aktifserver=homeserver End If aktifserver is a string for the url which httpjob uses with : Code: Copy Dim connection As HttpJob connection.Initialize("getir",Me) connection.PostString(aktifserver,"action=getir&paket="&GetAppName) so if the job fails active server changes to other one for further tries . Homeserver is set to be tried first with app launch. My problem is , when i disconnect my homeserver from the internet and launch my app , my app first tries my home server but before it gets the job fail : JobName = getir, Success = false it takes too much time like 20-30 seconds so that it continues to other one . I need about 3-4 second at most to switch the servers . How can i achieve this ? TY
tufanv Expert Licensed User Longtime User May 27, 2017 #2 I found the answer here : https://www.b4x.com/android/forum/threads/httputils2-poststring-timeout.40228/#post-240139 Upvote 0
I found the answer here : https://www.b4x.com/android/forum/threads/httputils2-poststring-timeout.40228/#post-240139