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

Skip to content
Snippets Groups Projects
Commit 39dc60cf authored by zzz's avatar zzz
Browse files

only log UPnP network disconnected error once

parent 09e867b1
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,8 @@ class UPnPManager {
private volatile boolean _isRunning;
private volatile boolean _shouldBeRunning;
private volatile long _lastRescan;
private volatile boolean _errorLogged;
private boolean _errorLogged;
private boolean _disconLogged;
private InetAddress _detectedAddress;
private final TransportManager _manager;
private final SimpleTimer2.TimedEvent _rescanner;
......@@ -103,10 +104,14 @@ class UPnPManager {
_rescanner.schedule(RESCAN_SHORT_DELAY);
// Do we have a non-loopback, non-broadcast address?
// If not, that's why it failed (HTTPServer won't start)
if (!Addresses.isConnected())
_log.logAlways(Log.WARN, "UPnP start failed - no network connection?");
else
if (!Addresses.isConnected()) {
if (!_disconLogged) {
_log.logAlways(Log.WARN, "UPnP start failed - no network connection?");
_disconLogged = true;
}
} else {
_log.error("UPnP start failed - port conflict?");
}
}
}
......
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