mirror of
https://github.com/zulip/zulip.git
synced 2025-11-13 18:36:36 +00:00
socket: Remove old requests
(imported from commit 75bc776e539a2f036ed486e99a6635c38f56cdcb)
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user