From: erickson Date: Tue, 12 Oct 2010 02:59:07 +0000 (+0000) Subject: when we add xhr responses onto the end of the queue, stash the original session as... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=2206180989fb5ec34f3f99888cb168e2ef0e8183;p=OpenSRF.git when we add xhr responses onto the end of the queue, stash the original session as well, otherwise we're attempting to ask a session questions about requests it's not tracking git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_1_4@2033 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/src/javascript/opensrf.js b/src/javascript/opensrf.js index c014cd7..c3c6212 100644 --- a/src/javascript/opensrf.js +++ b/src/javascript/opensrf.js @@ -256,12 +256,12 @@ OpenSRF.Stack.push = function(net_msg, callbacks) { // push the latest responses onto the end of the inbound message queue for(var i = 0; i < osrf_msgs.length; i++) - OpenSRF.Stack.queue.push({msg : osrf_msgs[i], callbacks : callbacks}); + OpenSRF.Stack.queue.push({msg : osrf_msgs[i], callbacks : callbacks, ses : ses}); // continue processing responses, oldest to newest while(OpenSRF.Stack.queue.length) { var data = OpenSRF.Stack.queue.shift(); - OpenSRF.Stack.handle_message(ses, data.msg, data.callbacks); + OpenSRF.Stack.handle_message(data.ses, data.msg, data.callbacks); } }