#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 15 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 Changed 15 years ago by
Milestone: | → 0.3release |
---|
patch applied today