FS-8048 [verto_communicator] #resolve Fixing infinite reconnect after changing hostname and websocket url.

This commit is contained in:
Italo Rossi 2015-08-27 01:01:04 -03:00
parent 2eb957453f
commit eefe21536d
1 changed files with 6 additions and 1 deletions

View File

@ -545,7 +545,12 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
that.updateResolutions(resolutions['validRes']); that.updateResolutions(resolutions['validRes']);
that.refreshVideoResolution(); that.refreshVideoResolution();
// Checking if we have a failed connection attempt before
// connecting again.
if (data.instance && !data.instance.rpcClient.socketReady()) {
clearTimeout(data.instance.rpcClient.to);
data.instance.logout();
};
data.instance = new jQuery.verto({ data.instance = new jQuery.verto({
login: data.login + '@' + data.hostname, login: data.login + '@' + data.hostname,
passwd: data.password, passwd: data.password,