davelt99 Member Licensed User Longtime User Oct 15, 2015 #1 If there is limited wi-fi and the timeout period expires as in: B4X: Job1.Initialize("Job1",Me) Job1.PostString(sURL,"") Job1.GetRequest.Timeout=5000 Which Job1 event occurs next ? Thank you,
If there is limited wi-fi and the timeout period expires as in: B4X: Job1.Initialize("Job1",Me) Job1.PostString(sURL,"") Job1.GetRequest.Timeout=5000 Which Job1 event occurs next ? Thank you,
DonManfred Expert Licensed User Longtime User Oct 15, 2015 #2 davelt99 said: Which Job1 event occurs next ? Click to expand... JobDone Upvote 0
davelt99 Member Licensed User Longtime User Oct 15, 2015 #3 The above Job1 code is part of the sub "LoadLayoutToPanel". With wi-fi turned off, immediately after the B4X: Job1.GetRequest.Timeout=5000 the code goes to B4X: End Sub and never gets to JobDone. Seems like the timeout is not being implemented. If there is no wi-fi and the timeout has expired then the code only Upvote 0
The above Job1 code is part of the sub "LoadLayoutToPanel". With wi-fi turned off, immediately after the B4X: Job1.GetRequest.Timeout=5000 the code goes to B4X: End Sub and never gets to JobDone. Seems like the timeout is not being implemented. If there is no wi-fi and the timeout has expired then the code only
Erel B4X founder Staff member Licensed User Longtime User Oct 15, 2015 #4 The code will always continue. JobDone will be raised later. Upvote 0
davelt99 Member Licensed User Longtime User Oct 15, 2015 #5 Did further testing and without wi-fi the following code: B4X: ProgressDialogShow("Validating This Device...") Job1.Initialize("Job1",Me) Job1.PostString(sURL,"") Job1.GetRequest.Timeout=5000 never gets to JobDone. With wi-fi enabled, JobDone is raised within 3 seconds Upvote 0
Did further testing and without wi-fi the following code: B4X: ProgressDialogShow("Validating This Device...") Job1.Initialize("Job1",Me) Job1.PostString(sURL,"") Job1.GetRequest.Timeout=5000 never gets to JobDone. With wi-fi enabled, JobDone is raised within 3 seconds
DonManfred Expert Licensed User Longtime User Oct 15, 2015 #6 i dont see a DIM in your code... Make sure to use a new DIMmed Job each time you send a Job. Upvote 0
davelt99 Member Licensed User Longtime User Oct 15, 2015 #7 Thanks for the suggestion. Using HttpUtils2 version 2.10 and Okhttp version 1.00 Rewrote using a DIM immediately before posting the string B4X: Dim job2 As HttpJob ProgressDialogShow("Validating This Device...") job2.Initialize("job2",Me) job2.PostString(sURL,"") job2.GetRequest.Timeout=5000 Still never gets to: B4X: Sub JobDone (job As HttpJob) If job.Success = True Upvote 0
Thanks for the suggestion. Using HttpUtils2 version 2.10 and Okhttp version 1.00 Rewrote using a DIM immediately before posting the string B4X: Dim job2 As HttpJob ProgressDialogShow("Validating This Device...") job2.Initialize("job2",Me) job2.PostString(sURL,"") job2.GetRequest.Timeout=5000 Still never gets to: B4X: Sub JobDone (job As HttpJob) If job.Success = True
Erel B4X founder Staff member Licensed User Longtime User Oct 18, 2015 #8 Please upload your project (File - Export as zip). Upvote 0
davelt99 Member Licensed User Longtime User Oct 18, 2015 #9 Erel said: Please upload your project (File - Export as zip). Click to expand... Code in question is lines 395-400 Thank you, Attachments Pool-Data.zip 25.2 KB · Views: 289 Upvote 0
Erel said: Please upload your project (File - Export as zip). Click to expand... Code in question is lines 395-400 Thank you,
Erel B4X founder Staff member Licensed User Longtime User Oct 19, 2015 #10 We cannot run this project as there are many modules missing. Set a breakpoint on these lines to see whether they are reached at all. Upvote 0
We cannot run this project as there are many modules missing. Set a breakpoint on these lines to see whether they are reached at all.