Add DEFAULT_PORT

This commit is contained in:
Adeel Zafar 2019-08-18 23:41:40 +05:00
parent bf9898b5bc
commit 04cf0398c6

View File

@ -20,6 +20,7 @@ import org.kiwix.kiwixlib.JNIKiwixServer;
public class WebServerHelper {
public static boolean isServerStarted;
private static int port;
private final int DEFAULT_PORT = 8080;
private final JNIKiwixLibrary kiwixLibrary = new JNIKiwixLibrary();
private final JNIKiwixServer kiwixServer = new JNIKiwixServer(kiwixLibrary);
private static final String TAG = "WebServerHelper";
@ -53,7 +54,7 @@ public class WebServerHelper {
private boolean startAndroidWebServer(ArrayList<String> selectedBooksPath) {
if (!isServerStarted) {
port = 8080;
port = DEFAULT_PORT;
//Call to start server
for (String path : selectedBooksPath) {
try {