* limit the resend delay to a max of 60s between resends

* reduce the max # resends to 5
* if the session.sendMessage fails, we're fucked, so kill the socket
This commit is contained in:
jrandom
2004-11-06 08:02:02 +00:00
committed by zzz
parent 314316cee0
commit 592e9dc3ff
3 changed files with 17 additions and 3 deletions

View File

@@ -48,6 +48,8 @@ class PacketQueue {
if (packet.getAckTime() > 0) {
_log.debug("Not resending " + packet);
return;
} else {
_log.debug("Sending... " + packet);
}
// this should not block!
long begin = _context.clock().now();
@@ -56,6 +58,7 @@ class PacketQueue {
if (!sent) {
if (_log.shouldLog(Log.WARN))
_log.warn("Send failed for " + packet);
packet.getConnection().disconnect(false);
} else {
packet.setKeyUsed(keyUsed);
packet.setTagsSent(tagsSent);