forked from I2P_Developers/i2p.i2p
only log UPnP network disconnected error once
This commit is contained in:
@@ -37,7 +37,8 @@ class UPnPManager {
|
|||||||
private volatile boolean _isRunning;
|
private volatile boolean _isRunning;
|
||||||
private volatile boolean _shouldBeRunning;
|
private volatile boolean _shouldBeRunning;
|
||||||
private volatile long _lastRescan;
|
private volatile long _lastRescan;
|
||||||
private volatile boolean _errorLogged;
|
private boolean _errorLogged;
|
||||||
|
private boolean _disconLogged;
|
||||||
private InetAddress _detectedAddress;
|
private InetAddress _detectedAddress;
|
||||||
private final TransportManager _manager;
|
private final TransportManager _manager;
|
||||||
private final SimpleTimer2.TimedEvent _rescanner;
|
private final SimpleTimer2.TimedEvent _rescanner;
|
||||||
@@ -103,10 +104,14 @@ class UPnPManager {
|
|||||||
_rescanner.schedule(RESCAN_SHORT_DELAY);
|
_rescanner.schedule(RESCAN_SHORT_DELAY);
|
||||||
// Do we have a non-loopback, non-broadcast address?
|
// Do we have a non-loopback, non-broadcast address?
|
||||||
// If not, that's why it failed (HTTPServer won't start)
|
// If not, that's why it failed (HTTPServer won't start)
|
||||||
if (!Addresses.isConnected())
|
if (!Addresses.isConnected()) {
|
||||||
_log.logAlways(Log.WARN, "UPnP start failed - no network connection?");
|
if (!_disconLogged) {
|
||||||
else
|
_log.logAlways(Log.WARN, "UPnP start failed - no network connection?");
|
||||||
|
_disconLogged = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
_log.error("UPnP start failed - port conflict?");
|
_log.error("UPnP start failed - port conflict?");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user