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

Skip to content
Snippets Groups Projects
Unverified Commit 33f9bd81 authored by zzz's avatar zzz
Browse files

Transport: Fix NPE at shutdown caused by _currentAddresses change

parent 73d226e7
No related branches found
No related tags found
No related merge requests found
......@@ -610,9 +610,14 @@ public abstract class TransportImpl implements Transport {
* @param address null to remove all
*/
protected void replaceAddress(RouterAddress address) {
boolean isIPv6 = TransportUtil.isIPv6(address);
if (_log.shouldWarn())
_log.warn("Replacing IPv" + (isIPv6 ? '6' : '4') + " address with " + address, new Exception());
boolean isIPv6;
if (address != null) {
isIPv6 = TransportUtil.isIPv6(address);
if (_log.shouldWarn())
_log.warn("Replacing IPv" + (isIPv6 ? '6' : '4') + " address with " + address, new Exception());
} else {
isIPv6 = false;
}
int sz;
synchronized(_currentAddresses) {
if (address == null) {
......
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