error Previous request not completed
J. Landman Gay
jacque at hyperactivesw.com
Thu Aug 4 15:11:49 EDT 2016
On 8/4/2016 11:05 AM, Sannyasin Brahmanathaswami wrote:
> it still failed and locked up.. that's where I added "put the result"
> at the end of the loop and there it was again:
> "error Previous request not completed"
We've had the same issue, the problem occurs usually on slower
connections. Chipp Walters gave me the workaround we're using now which
isn't perfect but seems to resolve many instances.
function needToRetry pError -- Chipp Walters
if pError is "timeout" or pError contains "socket timeout" or pError
contains "error socket closed" \
or pError contains "Previous request not completed" then
In the script that gets or sends to the server (in our case, get) you
call the function and don't let the script proceed until it returns false:
repeat 3 times -- Chipp's method for unreliable connections
get url tURL
put the result into tNetworkErr
put it into tData
if not needToRetry(tNetworkErr) then exit repeat
wait 100 milliseconds -- don't use w/msgs, let it block
Chipp originally repeated 5 times but 3 seems to work most of the time
and prevents an even longer delay. This will hang the script for a while
if the connection doesn't succeed right away. I set the socketTimeOut to
a lower number so that each attempt wouldn't wait the default 10 seconds.
For most of our users, the repeat never has to iterate but for those
with problematic connections it seems to help a little.
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode