This commit is contained in:
Liang Ding 2014-10-23 13:07:48 +08:00
parent e244cfd6b4
commit 1ceeb700c9
4 changed files with 4 additions and 4 deletions

View File

@ -9,7 +9,7 @@ var notification = {
this._initWS();
},
_initWS: function () {
var notificationWS = new WebSocket(config.channel.shell + '/notification/ws?sid=' + config.wideSessionId);
var notificationWS = new ReconnectingWebSocket(config.channel.shell + '/notification/ws?sid=' + config.wideSessionId);
notificationWS.onopen = function () {
console.log('[notification onopen] connected');

View File

@ -79,7 +79,7 @@ var session = {
},
_initWS: function () {
// 用于保持会话,如果该通道断开,则服务器端会销毁会话状态,回收相关资源.
var sessionWS = new WebSocket(config.channel.session + '/session/ws?sid=' + config.wideSessionId);
var sessionWS = new ReconnectingWebSocket(config.channel.session + '/session/ws?sid=' + config.wideSessionId);
sessionWS.onopen = function () {
console.log('[session onopen] connected');

View File

@ -1,7 +1,7 @@
var shell = {
_shellWS: undefined,
_initWS: function () {
shell.shellWS = new WebSocket(config.channel.shell + '/shell/ws?sid=' + config.wideSessionId);
shell.shellWS = new ReconnectingWebSocket(config.channel.shell + '/shell/ws?sid=' + config.wideSessionId);
shell.shellWS.onopen = function () {
console.log('[shell onopen] connected');
};

View File

@ -299,7 +299,7 @@ var wide = {
});
},
_initWS: function () {
var outputWS = new WebSocket(config.channel.output + '/output/ws?sid=' + config.wideSessionId);
var outputWS = new ReconnectingWebSocket(config.channel.output + '/output/ws?sid=' + config.wideSessionId);
outputWS.onopen = function () {
console.log('[output onopen] connected');
};