forked from I2P_Developers/i2p.i2p
* UDP: Prevent 100% CPU when UDP bind fails;
change bind fail message from ERROR to CRIT
This commit is contained in:
@@ -126,7 +126,7 @@ public class PacketHandler {
|
|||||||
_state = 2;
|
_state = 2;
|
||||||
UDPPacket packet = _endpoint.receive();
|
UDPPacket packet = _endpoint.receive();
|
||||||
_state = 3;
|
_state = 3;
|
||||||
if (packet == null) continue; // keepReading is probably false...
|
if (packet == null) break; // keepReading is probably false, or bind failed...
|
||||||
|
|
||||||
packet.received();
|
packet.received();
|
||||||
if (_log.shouldLog(Log.INFO))
|
if (_log.shouldLog(Log.INFO))
|
||||||
|
@@ -44,8 +44,7 @@ public class UDPEndpoint {
|
|||||||
_sender.startup();
|
_sender.startup();
|
||||||
_receiver.startup();
|
_receiver.startup();
|
||||||
} catch (SocketException se) {
|
} catch (SocketException se) {
|
||||||
if (_log.shouldLog(Log.ERROR))
|
_log.log(Log.CRIT, "Unable to bind on port " + _listenPort, se);
|
||||||
_log.error("Unable to bind on " + _listenPort, se);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user