Rather than delaying datagrams if we've exceeded the throttle, just drop them.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6137 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Andrzej Kapolka
2010-08-28 02:30:17 +00:00
parent 90929ab5d7
commit 73d2bd1741
@@ -953,8 +953,13 @@ public class BlockingCommunicator extends Communicator
return;
}
// make sure we're not exceeding our outgoing throttle rate
throttleOutgoingMessage();
// if we're exceeding our outgoing throttle rate, drop the packet
Throttle throttle = _client.getOutgoingMessageThrottle();
synchronized(throttle) {
if (throttle.throttleOp()) {
return;
}
}
try {
// write the message out the socket