if we've already sent our close packet but we still want to send something, send an ack packet
This commit is contained in:
@ -45,10 +45,14 @@ class SchedulerClosing extends SchedulerImpl {
|
|||||||
if (con.getNextSendTime() <= 0)
|
if (con.getNextSendTime() <= 0)
|
||||||
con.setNextSendTime(_context.clock().now() + con.getOptions().getSendAckDelay());
|
con.setNextSendTime(_context.clock().now() + con.getOptions().getSendAckDelay());
|
||||||
long remaining = con.getNextSendTime() - _context.clock().now();
|
long remaining = con.getNextSendTime() - _context.clock().now();
|
||||||
|
if (_log.shouldLog(Log.DEBUG))
|
||||||
|
_log.debug("Event occurred w/ remaining: " + remaining + " on " + con);
|
||||||
if (remaining <= 0) {
|
if (remaining <= 0) {
|
||||||
if (con.getCloseSentOn() <= 0) {
|
if (con.getCloseSentOn() <= 0) {
|
||||||
con.sendAvailable();
|
con.sendAvailable();
|
||||||
con.setNextSendTime(_context.clock().now() + con.getOptions().getSendAckDelay());
|
con.setNextSendTime(_context.clock().now() + con.getOptions().getSendAckDelay());
|
||||||
|
} else {
|
||||||
|
con.ackImmediately();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//if (remaining < 5*1000)
|
//if (remaining < 5*1000)
|
||||||
|
Reference in New Issue
Block a user