mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-07 07:37:11 -04:00
bigger timeout in re-connection. Still retries in the background when saying impossible
This commit is contained in:
parent
ff86dee2f5
commit
11682661e4
4 changed files with 24 additions and 2 deletions
|
@ -164,7 +164,8 @@ function handshake()
|
|||
//connect
|
||||
socket = pad.socket = io.connect(url, {
|
||||
resource: resource,
|
||||
'max reconnection attempts': 3,
|
||||
'reconnection limit': 1000*60,
|
||||
'max reconnection attempts': 40,
|
||||
'sync disconnect on unload' : false
|
||||
});
|
||||
|
||||
|
@ -234,7 +235,7 @@ function handshake()
|
|||
|
||||
pad.collabClient.setChannelState("RECONNECTING");
|
||||
|
||||
disconnectTimeout = setTimeout(disconnectEvent, 10000);
|
||||
disconnectTimeout = setTimeout(disconnectEvent, 40000);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -693,6 +694,10 @@ var pad = {
|
|||
if (newState == "CONNECTED")
|
||||
{
|
||||
padconnectionstatus.connected();
|
||||
padeditor.enable();
|
||||
padeditbar.enable();
|
||||
paddocbar.enable();
|
||||
padimpexp.enable();
|
||||
}
|
||||
else if (newState == "RECONNECTING")
|
||||
{
|
||||
|
|
|
@ -446,6 +446,11 @@ var paddocbar = (function()
|
|||
enabled = false;
|
||||
self.render();
|
||||
},
|
||||
enable: function()
|
||||
{
|
||||
enabled = true;
|
||||
self.render();
|
||||
},
|
||||
handleResizePage: function()
|
||||
{
|
||||
// Side-step circular reference. This should be injected.
|
||||
|
|
|
@ -109,6 +109,10 @@ var padeditbar = (function()
|
|||
{
|
||||
$("#editbar").addClass('disabledtoolbar').removeClass("enabledtoolbar");
|
||||
},
|
||||
enable: function()
|
||||
{
|
||||
$("#editbar").removeClass('disabledtoolbar').addClass("enabledtoolbar");
|
||||
},
|
||||
toolbarClick: function(cmd)
|
||||
{
|
||||
if (self.isEnabled())
|
||||
|
|
|
@ -151,6 +151,14 @@ var padeditor = (function()
|
|||
self.ace.setEditable(false);
|
||||
}
|
||||
},
|
||||
enable: function()
|
||||
{
|
||||
if (self.ace)
|
||||
{
|
||||
self.ace.setProperty("grayedOut", false);
|
||||
self.ace.setEditable(true);
|
||||
}
|
||||
},
|
||||
restoreRevisionText: function(dataFromServer)
|
||||
{
|
||||
pad.addHistoricalAuthors(dataFromServer.historicalAuthorData);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue