I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 89764c12 authored by zzz's avatar zzz
Browse files

bob finals, synch

parent 328d7d00
No related branches found
No related tags found
No related merge requests found
...@@ -119,15 +119,16 @@ public class BOB implements Runnable, ClientApp { ...@@ -119,15 +119,16 @@ public class BOB implements Runnable, ClientApp {
public final static String PROP_BOB_HOST = "BOB.host"; public final static String PROP_BOB_HOST = "BOB.host";
public final static String PROP_CFG_VER = "BOB.CFG.VER"; public final static String PROP_CFG_VER = "BOB.CFG.VER";
/** unused when started via the ClientApp interface */
private static BOB _bob; private static BOB _bob;
private NamedDB database; private final NamedDB database;
private Properties props = new Properties(); private final Properties props = new Properties();
private AtomicBoolean spin = new AtomicBoolean(true); private final AtomicBoolean spin = new AtomicBoolean(true);
private static final String P_RUNNING = "RUNNING"; private static final String P_RUNNING = "RUNNING";
private static final String P_STARTING = "STARTING"; private static final String P_STARTING = "STARTING";
private static final String P_STOPPING = "STOPPING"; private static final String P_STOPPING = "STOPPING";
private AtomicBoolean lock = new AtomicBoolean(false); private final AtomicBoolean lock = new AtomicBoolean(false);
// no longer used. // no longer used.
// private static int maxConnections = 0; // private static int maxConnections = 0;
...@@ -143,8 +144,9 @@ public class BOB implements Runnable, ClientApp { ...@@ -143,8 +144,9 @@ public class BOB implements Runnable, ClientApp {
* Stop BOB gracefully * Stop BOB gracefully
* @deprecated unused * @deprecated unused
*/ */
public static void stop() { public synchronized static void stop() {
_bob.shutdown(null); if (_bob != null)
_bob.shutdown(null);
} }
/** /**
...@@ -189,7 +191,7 @@ public class BOB implements Runnable, ClientApp { ...@@ -189,7 +191,7 @@ public class BOB implements Runnable, ClientApp {
* *
* @param args * @param args
*/ */
public static void main(String[] args) { public synchronized static void main(String[] args) {
try { try {
_bob = new BOB(I2PAppContext.getGlobalContext(), null, args); _bob = new BOB(I2PAppContext.getGlobalContext(), null, args);
_bob.startup(); _bob.startup();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment