forked from I2P_Developers/i2p.i2p
Another deadlock fix: remove sync in Router.isHidden()
This commit is contained in:
@ -1,3 +1,8 @@
|
||||
2015-12-12 zzz
|
||||
* Router:
|
||||
- Add family public key to router info (ticket #1510)
|
||||
- More deadlock prevention (ticket #1722)
|
||||
|
||||
2015-12-11 zzz
|
||||
* Logs: Windows line ending fixes
|
||||
* Router:
|
||||
|
@ -852,6 +852,7 @@ public class Router implements RouterClock.ClockShiftListener {
|
||||
Properties stats = _context.statPublisher().publishStatistics();
|
||||
|
||||
ri.setOptions(stats);
|
||||
// deadlock thru createAddresses() thru SSU REA... move outside lock?
|
||||
ri.setAddresses(_context.commSystem().createAddresses());
|
||||
|
||||
SigningPrivateKey key = _context.keyManager().getSigningPrivateKey();
|
||||
@ -1002,16 +1003,18 @@ public class Router implements RouterClock.ClockShiftListener {
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
* Warning - risk of deadlock - do not call while holding locks
|
||||
* This checks the config only. We don't check the current RI
|
||||
* due to deadlocks.
|
||||
*
|
||||
*/
|
||||
public boolean isHidden() {
|
||||
RouterInfo ri;
|
||||
synchronized (_routerInfoLock) {
|
||||
ri = _routerInfo;
|
||||
}
|
||||
if ( (ri != null) && (ri.isHidden()) )
|
||||
//RouterInfo ri;
|
||||
//synchronized (_routerInfoLock) {
|
||||
// ri = _routerInfo;
|
||||
//}
|
||||
//if ( (ri != null) && (ri.isHidden()) )
|
||||
// return true;
|
||||
if (_context.getBooleanProperty(PROP_HIDDEN))
|
||||
return true;
|
||||
String h = _context.getProperty(PROP_HIDDEN_HIDDEN);
|
||||
if (h != null)
|
||||
|
@ -18,7 +18,7 @@ public class RouterVersion {
|
||||
/** deprecated */
|
||||
public final static String ID = "Monotone";
|
||||
public final static String VERSION = CoreVersion.VERSION;
|
||||
public final static long BUILD = 12;
|
||||
public final static long BUILD = 13;
|
||||
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "";
|
||||
|
Reference in New Issue
Block a user