When receiving an answer from the server, it set the flag to false (the server always responds unless something happened or was busy, or else).
My socketTimeout script is something like this:
Code: Select all
on socketTimeout theID
if sWaitingForDataIn then
answer "Not responding. Want to stop? with "stop" OR "Keep on"
if it is "stop then
close socket theID
end if
end if
end socketTimeout
I mean, it looks to me that if I do 2 write to socket in a row with the same message, the "on socketTimeout" will receive, after the socketTimeoutInterval, 2 calls. If for a glitch the first one wasn't answered by the server (busy?), while the second try was, the socketTimout will still report the connection problem.
How can I avoid this?
Thanks