dabs
Full Member
Posts: 78
|
Post by dabs on Jun 25, 2019 14:03:48 GMT
I decided to take the plunge and update my RMS to 6.1. Will check if I can reproduce this behavior with that version. Am still fighting with trivial stuff such as where to find the Browser Developer Tools window...
|
|
dabs
Full Member
Posts: 78
|
Post by dabs on Jun 25, 2019 14:19:07 GMT
|
|
dabs
Full Member
Posts: 78
|
Post by dabs on Feb 20, 2020 17:28:52 GMT
I must admit that I kind of forgot about this issue. But now I'm receiving bug reports from my users again...
Apparently, what happens is this:
0) My app is configured to use a network timeout of 60 seconds. 1) My app sends a POST request to a backend (I control this backend). 2) The backend takes more than 60 seconds to respond (in this case, it happens because my backend communicates with *another* backend, and that backend can be quite slow). 3) The app figures out that it hasn't received a reply within the 60 seconds, and tries to resend the POST request (note: this happens automatically, there is no retry code anywhere which I've written). 4) The backend receives this retry request, and tries to send that to that 3rd party backend *again*, resulting in this request being saved twice (or perhaps more).
So my question is:
can I disable this "retry" mechanism? BTW, I'm using version 6.2.0 of RhoStudio.
Regards, DanĂel
|
|
|
Post by Vladimir Musulainen on Mar 9, 2020 22:11:41 GMT
Daniel,
we cannot reproduce the issue. Our sample:
Controller def get_request Rho::Network.responseTimeout = 5 Rho::Network.get({url: "<host>:<port>"}) render string: "" end
simple ruby server
while session = server.accept request = session.gets 10.times do |n| sleep(1) end session.print "HTTP/1.1 200\r\n" session.print "Content-Type: text/html\r\n" session.print "\r\n" # 3 session.print "The time is #{Time.now}" session.close end
Mobile App log:
03-10 01:00:52.657 7960 8056 I APP : T 03/10/2020 01:00:52:657 919ff970 Net| Activate CURLNetRequest: METHOD = [GET] URL = [http://192.168.1.115:5678] BODY = [] 03-10 01:00:52.663 7960 8056 I APP : T 03/10/2020 01:00:52:663 919ff970 Net| we still have active transfers but no data ready at this moment; waiting... 03-10 01:00:53.664 7960 8056 I APP : T 03/10/2020 01:00:53:664 919ff970 Net| No activity on sockets, check them again 03-10 01:00:53.665 7960 8056 I APP : T 03/10/2020 01:00:53:665 919ff970 Net| we still have active transfers but no data ready at this moment; waiting... 03-10 01:00:54.667 7960 8056 I APP : T 03/10/2020 01:00:54:667 919ff970 Net| No activity on sockets, check them again 03-10 01:00:54.673 7960 8056 I APP : T 03/10/2020 01:00:54:667 919ff970 Net| we still have active transfers but no data ready at this moment; waiting... 03-10 01:00:55.679 7960 8056 I APP : T 03/10/2020 01:00:55:679 919ff970 Net| No activity on sockets, check them again 03-10 01:00:55.679 7960 8056 I APP : T 03/10/2020 01:00:55:679 919ff970 Net| we still have active transfers but no data ready at this moment; waiting... 03-10 01:00:56.682 7960 8056 I APP : T 03/10/2020 01:00:56:682 919ff970 Net| No activity on sockets, check them again 03-10 01:00:56.683 7960 8056 I APP : T 03/10/2020 01:00:56:683 919ff970 Net| we still have active transfers but no data ready at this moment; waiting... 03-10 01:00:57.685 7960 8056 I APP : T 03/10/2020 01:00:57:685 919ff970 Net| No activity on sockets, check them again 03-10 01:00:57.686 7960 8056 I APP : E 03/10/2020 01:00:57:686 919ff970 Net| Operation finished with error 28: Timeout was reached 03-10 01:00:57.686 7960 8056 I APP : E 03/10/2020 01:00:57:686 919ff970 Net| CURLNetRequest: METHOD = [GET] URL = [http://192.168.1.115:5678] BODY = [] 03-10 01:00:57.687 7960 8056 I APP : T 03/10/2020 01:00:57:687 919ff970 Net| Deactivate CURLNetRequest: METHOD = [GET] URL = [http://192.168.1.115:5678] BODY = [] 03-10 01:00:57.688 7960 8056 I APP : T 03/10/2020 01:00:57:687 919ff970 Net| Deactivation is DONE 03-10 01:00:57.694 7960 8056 I APP : E 03/10/2020 01:00:57:694 919ff970 RhodesService| PING network FAILED. 03-10 01:00:57.694 7960 8056 I APP : T 03/10/2020 01:00:57:694 919ff970 Net| CURLNetRequest::doPull - Status code: 0, response size: 0 03-10 01:00:57.695 7960 8056 I APP : I 03/10/2020 01:00:57:694 919ff970 Net| Connection was closed by timeout, but we have part of data received; try to restore connection 03-10 01:00:57.695 7960 8056 I APP : T 03/10/2020 01:00:57:695 919ff970 Net| CURLNetRequest::makeResponse - nErrorCode: -1
There are now new network requests. Please, would you provide the sample demonstrating the issue or your app's log?
|
|