The state was checked immediately after the send() call - which yields unpredictable results because of the inherent multithreading - and then does nothing more than log a message about it. So, this winds up logging error messages at times when everything is perfectly fine, but doesn't recover from any sort of error.
this.xhr.onreadystatechange = this.recvTokenFromServer.bind(this);
this.xhr.send(msg);
- if (this.xhr.readyStatus <= 2)
- console.log("Error sending POST, readyStatus =" + this.xhr.readyStatus
- + ", msg = '" + msg + "'");
};
GSSWeb.prototype.recvTokenFromServer = function () {