Commit 6f9fe1b5 authored by Benjamin Fischer's avatar Benjamin Fischer
Browse files

[socket] fixed a "xhr undefined" bug

parent 328fb1ba
......@@ -277,8 +277,8 @@ define(["jquery", "emitter"], function($, Emitter) {
});
timeout = setTimeout(function() {
if (xhr.state() == "pending") {
xhr.abort("connection timeout (" + self.options.pollGracePeriod + ")");
if (self.xhr.state() == "pending") {
self.xhr.abort("connection timeout (" + self.options.pollGracePeriod + ")");
}
}, this.options.pollGracePeriod);
......@@ -314,12 +314,12 @@ define(["jquery", "emitter"], function($, Emitter) {
}
});
Socket.PollSocket = PollSocket;
// define common states
Socket.states = {
CONNECTING: 0,
CONNECTING: 0,
CONNECTED : 1,
CLOSING : 2,
CLOSED : 3
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment