forked from I2P_Developers/i2p.i2p
* NetDB: Reduce negative lookup cache time
* OCMOSJ: - Increase timeout if we must lookup leaseset * Streaming: - Shorter expire time in TCBCache - Don't fail a connection once it is up - Log tweaks
This commit is contained in:
@@ -281,27 +281,36 @@ class PacketQueue implements SendMessageStatusListener {
|
||||
case MessageStatusMessage.STATUS_SEND_FAILURE_EXPIRED_LEASESET:
|
||||
case MessageStatusMessage.STATUS_SEND_FAILURE_NO_LEASESET:
|
||||
case SendMessageStatusListener.STATUS_CANCELLED:
|
||||
if (_log.shouldLog(Log.WARN))
|
||||
_log.warn("Rcvd hard failure status " + status + " for msg " + msgId + " on " + con);
|
||||
_messageStatusMap.remove(id);
|
||||
IOException ioe = new I2PSocketException(status);
|
||||
con.getOutputStream().streamErrorOccurred(ioe);
|
||||
con.getInputStream().streamErrorOccurred(ioe);
|
||||
con.setConnectionError("failure code " + status);
|
||||
con.disconnect(false);
|
||||
if (con.getHighestAckedThrough() >= 0) {
|
||||
// a retxed SYN succeeded before the first SYN failed
|
||||
if (_log.shouldLog(Log.WARN))
|
||||
_log.warn("Rcvd hard failure but already connected, status " + status + " for msg " + msgId + " on " + con);
|
||||
} else if (!con.getIsConnected()) {
|
||||
if (_log.shouldLog(Log.WARN))
|
||||
_log.warn("Rcvd hard failure but already closed, status " + status + " for msg " + msgId + " on " + con);
|
||||
} else {
|
||||
if (_log.shouldLog(Log.WARN))
|
||||
_log.warn("Rcvd hard failure status " + status + " for msg " + msgId + " on " + con);
|
||||
_messageStatusMap.remove(id);
|
||||
IOException ioe = new I2PSocketException(status);
|
||||
con.getOutputStream().streamErrorOccurred(ioe);
|
||||
con.getInputStream().streamErrorOccurred(ioe);
|
||||
con.setConnectionError("failure code " + status);
|
||||
con.disconnect(false);
|
||||
}
|
||||
break;
|
||||
|
||||
case MessageStatusMessage.STATUS_SEND_BEST_EFFORT_SUCCESS:
|
||||
case MessageStatusMessage.STATUS_SEND_GUARANTEED_SUCCESS:
|
||||
case MessageStatusMessage.STATUS_SEND_SUCCESS_LOCAL:
|
||||
if (_log.shouldLog(Log.WARN))
|
||||
_log.warn("Rcvd success status " + status + " for msg " + msgId + " on " + con);
|
||||
if (_log.shouldLog(Log.INFO))
|
||||
_log.info("Rcvd success status " + status + " for msg " + msgId + " on " + con);
|
||||
_messageStatusMap.remove(id);
|
||||
break;
|
||||
|
||||
case MessageStatusMessage.STATUS_SEND_ACCEPTED:
|
||||
if (_log.shouldLog(Log.WARN))
|
||||
_log.warn("Rcvd accept status " + status + " for msg " + msgId + " on " + con);
|
||||
if (_log.shouldLog(Log.INFO))
|
||||
_log.info("Rcvd accept status " + status + " for msg " + msgId + " on " + con);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@@ -29,8 +29,8 @@ class TCBShare {
|
||||
private final CleanEvent _cleaner;
|
||||
private final double _rttDampening, _wdwDampening, _rttDevDampening;
|
||||
|
||||
private static final long EXPIRE_TIME = 30*60*1000;
|
||||
private static final long CLEAN_TIME = 10*60*1000;
|
||||
private static final long EXPIRE_TIME = 15*60*1000;
|
||||
private static final long CLEAN_TIME = 5*60*1000;
|
||||
///// constants defined in rfc 2140
|
||||
///// do not change unless you know what you're doing
|
||||
private static final double RTT_DAMPENING = 0.75;
|
||||
|
Reference in New Issue
Block a user