* UDP: Prevent 100% CPU when UDP bind fails;

change bind fail message from ERROR to CRIT
This commit is contained in:
zzz
2008-06-16 12:18:43 +00:00
parent c3a2adc97e
commit 7b81062816
2 changed files with 2 additions and 3 deletions

View File

@@ -126,7 +126,7 @@ public class PacketHandler {
_state = 2;
UDPPacket packet = _endpoint.receive();
_state = 3;
if (packet == null) continue; // keepReading is probably false...
if (packet == null) break; // keepReading is probably false, or bind failed...
packet.received();
if (_log.shouldLog(Log.INFO))

View File

@@ -44,8 +44,7 @@ public class UDPEndpoint {
_sender.startup();
_receiver.startup();
} catch (SocketException se) {
if (_log.shouldLog(Log.ERROR))
_log.error("Unable to bind on " + _listenPort, se);
_log.log(Log.CRIT, "Unable to bind on port " + _listenPort, se);
}
}