Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
philotas
Level 7

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
RokuMarkn
Level 7

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
Level 8

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

0 Kudos
philotas
Level 7

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