if (this.readyState == 1) {
// connected
self.ws_cb("open");
+ self.init_steps = 1;
}
};
this.ws.onmessage = function (msg) {
self.ctx_new += msg.data;
};
this.ws.onclose = function (msg) {
- self.xynt_streaming.log("onclose");
- self.ws_cb("close");
+ self.xynt_streaming.log("onclose"+self.init_steps);
+ if (self.init_steps == 0)
+ self.ws_cb("error");
+ else
+ self.ws_cb("close");
};
this.ws.onerror = function () {
// on error
stopped: true,
failed: false,
+ init_steps: 0,
+
ctx_old: "",
ctx_old_len: 0,
ctx_new: "",