mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-08 08:01:02 -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
|
//connect
|
||||||
socket = pad.socket = io.connect(url, {
|
socket = pad.socket = io.connect(url, {
|
||||||
resource: resource,
|
resource: resource,
|
||||||
'max reconnection attempts': 3,
|
'reconnection limit': 1000*60,
|
||||||
|
'max reconnection attempts': 40,
|
||||||
'sync disconnect on unload' : false
|
'sync disconnect on unload' : false
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -234,7 +235,7 @@ function handshake()
|
||||||
|
|
||||||
pad.collabClient.setChannelState("RECONNECTING");
|
pad.collabClient.setChannelState("RECONNECTING");
|
||||||
|
|
||||||
disconnectTimeout = setTimeout(disconnectEvent, 10000);
|
disconnectTimeout = setTimeout(disconnectEvent, 40000);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -693,6 +694,10 @@ var pad = {
|
||||||
if (newState == "CONNECTED")
|
if (newState == "CONNECTED")
|
||||||
{
|
{
|
||||||
padconnectionstatus.connected();
|
padconnectionstatus.connected();
|
||||||
|
padeditor.enable();
|
||||||
|
padeditbar.enable();
|
||||||
|
paddocbar.enable();
|
||||||
|
padimpexp.enable();
|
||||||
}
|
}
|
||||||
else if (newState == "RECONNECTING")
|
else if (newState == "RECONNECTING")
|
||||||
{
|
{
|
||||||
|
|
|
@ -446,6 +446,11 @@ var paddocbar = (function()
|
||||||
enabled = false;
|
enabled = false;
|
||||||
self.render();
|
self.render();
|
||||||
},
|
},
|
||||||
|
enable: function()
|
||||||
|
{
|
||||||
|
enabled = true;
|
||||||
|
self.render();
|
||||||
|
},
|
||||||
handleResizePage: function()
|
handleResizePage: function()
|
||||||
{
|
{
|
||||||
// Side-step circular reference. This should be injected.
|
// Side-step circular reference. This should be injected.
|
||||||
|
|
|
@ -109,6 +109,10 @@ var padeditbar = (function()
|
||||||
{
|
{
|
||||||
$("#editbar").addClass('disabledtoolbar').removeClass("enabledtoolbar");
|
$("#editbar").addClass('disabledtoolbar').removeClass("enabledtoolbar");
|
||||||
},
|
},
|
||||||
|
enable: function()
|
||||||
|
{
|
||||||
|
$("#editbar").removeClass('disabledtoolbar').addClass("enabledtoolbar");
|
||||||
|
},
|
||||||
toolbarClick: function(cmd)
|
toolbarClick: function(cmd)
|
||||||
{
|
{
|
||||||
if (self.isEnabled())
|
if (self.isEnabled())
|
||||||
|
|
|
@ -151,6 +151,14 @@ var padeditor = (function()
|
||||||
self.ace.setEditable(false);
|
self.ace.setEditable(false);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
enable: function()
|
||||||
|
{
|
||||||
|
if (self.ace)
|
||||||
|
{
|
||||||
|
self.ace.setProperty("grayedOut", false);
|
||||||
|
self.ace.setEditable(true);
|
||||||
|
}
|
||||||
|
},
|
||||||
restoreRevisionText: function(dataFromServer)
|
restoreRevisionText: function(dataFromServer)
|
||||||
{
|
{
|
||||||
pad.addHistoricalAuthors(dataFromServer.historicalAuthorData);
|
pad.addHistoricalAuthors(dataFromServer.historicalAuthorData);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue