#1069: Replaced SimpleScheduler with SimpleTimer2 in a few places

This commit is contained in:
dev
2015-04-15 15:32:40 +00:00
parent dc19d2fab3
commit 54dba980b4
11 changed files with 10 additions and 18 deletions

View File

@ -96,7 +96,7 @@ class ConnectionHandler {
// also check if expiration of the head is long past for overload detection with peek() ?
boolean success = _synQueue.offer(packet); // fail immediately if full
if (success) {
_context.simpleScheduler().addEvent(new TimeoutSyn(packet), _acceptTimeout);
_context.simpleTimer2().addEvent(new TimeoutSyn(packet), _acceptTimeout);
} else {
if (_log.shouldLog(Log.WARN))
_log.warn("Dropping new SYN request, as the queue is full");

View File

@ -233,7 +233,7 @@ class MessageOutputStream extends OutputStream {
// no need to be overly worried about duplicates - it would just
// push it further out
if (!_enqueued) {
// Maybe we could just use schedule() here - or even SimpleScheduler - not sure...
// Maybe we could just use schedule() here - or even SimpleTimer2 - not sure...
// To be safe, use forceReschedule() so we don't get lots of duplicates
// We've seen the queue blow up before, maybe it was this before the rewrite...
// So perhaps it IS wise to be "overly worried" ...