Implement reconnecting upon connection loss
TODO: test in various conditions
This commit is contained in:
parent
c4bddc993d
commit
849da1b5a2
5 changed files with 142 additions and 16 deletions
|
@ -263,6 +263,8 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
|
|||
|
||||
$rootScope.connected = false;
|
||||
$rootScope.waseverconnected = false;
|
||||
$rootScope.userdisconnect = false;
|
||||
$rootScope.reconnecting = false;
|
||||
|
||||
$rootScope.models = models;
|
||||
|
||||
|
@ -503,6 +505,10 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
|
|||
$scope.connectbutton = 'Connect';
|
||||
connection.disconnect();
|
||||
};
|
||||
$scope.reconnect = function() {
|
||||
var bufferId = models.getActiveBuffer().id;
|
||||
connection.attemptReconnect(bufferId, 3000);
|
||||
};
|
||||
|
||||
//XXX this is a bit out of place here, either move up to the rest of the firefox install code or remove
|
||||
$scope.install = function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue