B4J Question no response from server

le_toubib

Active Member
Licensed User
Longtime User
hi all
i m using this code to access a php file on a local server.
B4X:
    Dim findfno2 As HttpJob
        findfno2.Initialize("GlobalFind2", Me)
        findfno2.PostString("http://" & ServerIP & "/persons/x1-prepared2.php", "action=GlobalFind2&UniqueID=" & SurrogateKey )

the problem is that occasionally i dont get any response from server ... and its completely random ... and just by repeating the same code i receive a normal response .. in fact i receive the normal response most of the time ..
and when it hapens the server logs show no requests
is there any ways to predict/prevent/debug that?
 

udg

Expert
Licensed User
Longtime User
Sounds like an occasional timeout problem, a "natural" condition for every network.
Check the "Success" state and eventually repeat the post operation.

udg
 
Upvote 0

KMatle

Expert
Licensed User
Longtime User
At least httputils will show a timeout after 30 seconds (default) -> success = false. Are you sure that the request is really sent? :)

PS: Does it return to job.done? Which lib do you use (there are two for ui and non-ui)
 
Upvote 0
Top