Opened 14 years ago

Closed 14 years ago

Last modified 12 years ago

#446 closed defect (fixed)

dojo.io.queueBind is not working property after queue is empty

Reported by: anonymous Owned by: anonymous
Priority: high Milestone:
Component: General Version: 0.2
Keywords: queueBind, bind Cc:
Blocked By: Blocking:

Description

I have found that dojo.io.queueBind will work with a first 'batch' of requests, but once they all return no other requests can be sent. I have tracked it down to this function:

dojo.io._dispatchNextQueueBind = function(){

if(!dojo.io._queueBindInFlight){

dojo.io._queueBindInFlight = true; dojo.io.bind(dojo.io._bindQueue.shift());

}

}

It doesn't check if there are any elements left in dojo.io._bindQueue before calling shift() on it. I changed it to this:

dojo.io._dispatchNextQueueBind = function(){

if(!dojo.io._queueBindInFlight){

dojo.io._queueBindInFlight = true;

if (dojo.io._bindQueue.length > 0){

dojo.io.bind(dojo.io._bindQueue.shift());

} else {

dojo.io._queueBindInFlight = false;

}

}

}

and it works.

Change History (3)

comment:1 Changed 14 years ago by anonymous

Resolution: fixed
Status: newclosed

patch applied today

comment:2 Changed 14 years ago by alex

Milestone: 0.3release

comment:3 Changed 12 years ago by (none)

Milestone: 0.3release

Milestone 0.3release deleted

Note: See TracTickets for help on using tickets.