Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
philotas
Roku Guru

Async request/port questions (-10001 response code)

I have set the messagePort of a various async roUrlTransfers to that the one of the current screen one and I can do simultaneous requests.
The wait loop is in the same function as where calls get startet.

If I however then after the first call want to create another async call and start that call in another function using the same port from above then the requests gets cancelled
event.ResponseCode = -10001 and FailureReason ist "cancelled"

So why does the request get cancelled?

Thanks!

PS: being in bright script only (no xml components scripts)
0 Kudos
3 REPLIES 3
RokuMarkn
Visitor

Re: Async request/port questions (-10001 response code)

Are you letting the variable that holds the first roUrlTransfer go out of scope? Or are you using the same variable for both roUrlTransfers (which amounts to the same thing)? You must keep a reference to the roUrlTransfer until it is complete.

--Mark
0 Kudos
EnTerr
Roku Guru

Re: Async request/port questions (-10001 response code)

0 Kudos
philotas
Roku Guru

Re: Async request/port questions (-10001 response code)

"RokuMarkn" wrote:
Are you letting the variable that holds the first roUrlTransfer go out of scope? Or are you using the same variable for both roUrlTransfers (which amounts to the same thing)? You must keep a reference to the roUrlTransfer until it is complete.


thanks. that was it: I did not save a reference to the roUrlTransfer object.
0 Kudos