Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix upgrade time cannot beyond 24 days #1624

Open
wants to merge 3 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion conf/config.properties
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ peername=anonymous

# a loklak instance can upgrade itself, by default every 24 hours
# if an automatic update is not wanted, set this to i.e. ten years
upgradeInterval = 86400000
upgradeInterval = 24

# settings to prevent DoS
DoS.blackout = 100
Expand Down
3 changes: 2 additions & 1 deletion src/org/loklak/LoklakServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@
import org.loklak.stream.StreamServlet;
import org.loklak.tools.Browser;
import org.loklak.tools.OS;
import org.loklak.tools.DateParser;


public class LoklakServer {
Expand Down Expand Up @@ -308,7 +309,7 @@ public static void main(String[] args) throws Exception {


// read upgrade interval
Caretaker.upgradeTime = Caretaker.startupTime + DAO.getConfig("upgradeInterval", 86400000);
Caretaker.upgradeTime = Caretaker.startupTime + DAO.getConfig("upgradeInterval", 24) * DateParser.HOUR_MILLIS;

// if this is not headless, we can open a browser automatically
Browser.openBrowser("http://127.0.0.1:" + httpPort + "/");
Expand Down