forked from I2P_Developers/i2p.i2p
i2psnark: Add standalone shutdown method
This commit is contained in:
@ -15,6 +15,7 @@ public class RunStandalone {
|
||||
private final I2PAppContext _context;
|
||||
private int _port = 8002;
|
||||
private String _host = "127.0.0.1";
|
||||
private static RunStandalone _instance;
|
||||
|
||||
private RunStandalone(String args[]) throws Exception {
|
||||
_context = I2PAppContext.getGlobalContext();
|
||||
@ -32,10 +33,11 @@ public class RunStandalone {
|
||||
/**
|
||||
* Usage: RunStandalone [host [port]] (but must match what's in the jetty-i2psnark.xml file)
|
||||
*/
|
||||
public static void main(String args[]) {
|
||||
public synchronized static void main(String args[]) {
|
||||
try {
|
||||
RunStandalone runner = new RunStandalone(args);
|
||||
runner.start();
|
||||
_instance = runner;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
System.exit(1);
|
||||
@ -59,4 +61,15 @@ public class RunStandalone {
|
||||
public void stop() {
|
||||
_jettyStart.shutdown(null);
|
||||
}
|
||||
|
||||
/** @since 0.9.27 */
|
||||
public synchronized static void shutdown() {
|
||||
if (_instance != null)
|
||||
_instance.stop();
|
||||
// JettyStart.shutdown() is threaded
|
||||
try {
|
||||
Thread.sleep(3000);
|
||||
} catch (InterruptedException ie) {}
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
|
16
history.txt
16
history.txt
@ -1,3 +1,19 @@
|
||||
2016-10-02 zzz
|
||||
* Crypto: Add EdDSA private key spec constructor for hash
|
||||
* i2psnark: Add standalone shutdown method
|
||||
* i2ptunnel: Registration page layout fixes
|
||||
* SusiMail:
|
||||
- Show settings button even if no messages
|
||||
- Add nonce to forms
|
||||
|
||||
2016-09-24 zzz
|
||||
* DesktopGUI: Enable by default on Windows
|
||||
* i2ptunnel:
|
||||
- Accept default 'mysite.i2p' as a valid spoof host
|
||||
- Don't wrap destination in status message box
|
||||
* Reseed: Remove user.mx24.eu as requested
|
||||
* Utils: Move SipHashInline from util to crypto
|
||||
|
||||
2016-09-22 zzz
|
||||
* Crypto: Don't NPE in encoding when field not set
|
||||
* DataHelper: Fix read() for nonzero offset
|
||||
|
@ -18,10 +18,10 @@ public class RouterVersion {
|
||||
/** deprecated */
|
||||
public final static String ID = "Monotone";
|
||||
public final static String VERSION = CoreVersion.VERSION;
|
||||
public final static long BUILD = 11;
|
||||
public final static long BUILD = 12;
|
||||
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "";
|
||||
public final static String EXTRA = "-rc";
|
||||
public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;
|
||||
public static void main(String args[]) {
|
||||
System.out.println("I2P Router version: " + FULL_VERSION);
|
||||
|
Reference in New Issue
Block a user