parfeon
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2016
12:03 PM
Catch internet disconnection while performing long-poll request.
Using roURLTransfer component in my channel I perform long-poll request and wait for responses from service. While waiting for response I've tried to disconnect ethernet cable and waited for 10 seconds. After I connected cable back and connected with Terminal to console I find out what request still alive and after some time even received response from my backend.
Question is: is roURLTransfer able to trigger any errors related to network issues or it will just re-initialize request and keep working with it waiting response?
Best regards,
Sergey Mamontov
Question is: is roURLTransfer able to trigger any errors related to network issues or it will just re-initialize request and keep working with it waiting response?
Best regards,
Sergey Mamontov
2 REPLIES 2
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2016
05:15 AM
Re: Catch internet disconnection while performing long-poll request.
it is in the very nature of TCP/IP to persevere through network issues like lost packages and not to time out established TCP connections. Unplugging the network cable is an example of that.
roUrlConnection eventually times out i think, just wait more. It could fail with other errors too, have a look at roUrlEvent
roUrlConnection eventually times out i think, just wait more. It could fail with other errors too, have a look at roUrlEvent
parfeon
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2016
04:31 PM
Re: Catch internet disconnection while performing long-poll request.
Hi, thanks for your response.
I've tried to send request w/o network at all (unplugged cable before running my app w/o debugger).
After some time, I plugged cable back and connected with debug to find out, what request after all has been sent and I got some response. I understand what socket may survive some time if it has been opened, but in this case it not even started - why I still don't get any errors is a mystery for me.
Best regards,
Sergey Mamontov
I've tried to send request w/o network at all (unplugged cable before running my app w/o debugger).
After some time, I plugged cable back and connected with debug to find out, what request after all has been sent and I got some response. I understand what socket may survive some time if it has been opened, but in this case it not even started - why I still don't get any errors is a mystery for me.
Best regards,
Sergey Mamontov