mirror of https://github.com/zulip/zulip.git
socket: Remove old requests
(imported from commit 75bc776e539a2f036ed486e99a6635c38f56cdcb)
This commit is contained in:
parent
7abbf096de
commit
01835dca0f
|
@ -87,7 +87,8 @@ Socket.prototype = {
|
|||
};
|
||||
|
||||
sockjs.onmessage = function Socket__sockjs_onmessage(event) {
|
||||
var req_info = that._requests[event.data.client_meta.req_id];
|
||||
var req_id = event.data.client_meta.req_id;
|
||||
var req_info = that._requests[req_id];
|
||||
if (req_info === undefined) {
|
||||
blueslip.error("Got a response for an unknown request");
|
||||
return;
|
||||
|
@ -98,6 +99,7 @@ Socket.prototype = {
|
|||
} else {
|
||||
req_info.error('response', event.data.response);
|
||||
}
|
||||
delete that._requests[req_id];
|
||||
};
|
||||
|
||||
sockjs.onclose = function Socket__sockjs_onclose() {
|
||||
|
|
Loading…
Reference in New Issue