projects
/
brisk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add 'plain' encoding for websocket during the match too
[brisk.git]
/
web
/
xynt-streaming.js
diff --git
a/web/xynt-streaming.js
b/web/xynt-streaming.js
index
f80e8e8
..
1751ca0
100644
(file)
--- a/
web/xynt-streaming.js
+++ b/
web/xynt-streaming.js
@@
-18,6
+18,7
@@
function transport_ws(doc, xynt_streaming, page)
if (this.readyState == 1) {
// connected
self.ws_cb("open");
if (this.readyState == 1) {
// connected
self.ws_cb("open");
+ self.init_steps = 1;
}
};
this.ws.onmessage = function (msg) {
}
};
this.ws.onmessage = function (msg) {
@@
-26,8
+27,11
@@
function transport_ws(doc, xynt_streaming, page)
self.ctx_new += msg.data;
};
this.ws.onclose = 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
};
this.ws.onerror = function () {
// on error
@@
-49,6
+53,8
@@
transport_ws.prototype = {
stopped: true,
failed: false,
stopped: true,
failed: false,
+ init_steps: 0,
+
ctx_old: "",
ctx_old_len: 0,
ctx_new: "",
ctx_old: "",
ctx_old_len: 0,
ctx_new: "",