Changeset d9775a5
- Timestamp:
- Jun 9, 2019 4:42:43 PM (22 months ago)
- Branches:
- master
- Children:
- b0bca2f
- Parents:
- ea2ef7b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
router/java/src/net/i2p/router/InNetMessagePool.java
rea2ef7b rd9775a5 87 87 _context.statManager().createRateStat("inNetPool.droppedDeliveryStatusDelay", "How long after a delivery status message is created do we receive it back again (for messages that are too slow to be handled)", "InNetPool", new long[] { 60*60*1000l }); 88 88 _context.statManager().createRateStat("inNetPool.duplicate", "How often do we receive a duplicate message", "InNetPool", new long[] { 60*60*1000l }); 89 //_context.statManager().createRateStat("inNetPool.droppedTunnelCreateStatusMessage", "How often we drop a slow-to-arrive tunnel request response", "InNetPool", new long[] { 60*60*1000l, 24*60*60*1000l });90 89 _context.statManager().createRateStat("inNetPool.droppedDbLookupResponseMessage", "How often we drop a slow-to-arrive db search response", "InNetPool", new long[] { 60*60*1000l }); 91 90 } … … 176 175 boolean allowMatches = true; 177 176 178 if (type == TunnelGatewayMessage.MESSAGE_TYPE) { 177 switch (type) { 178 case TunnelGatewayMessage.MESSAGE_TYPE: 179 179 shortCircuitTunnelGateway(messageBody); 180 180 allowMatches = false; 181 } else if (type == TunnelDataMessage.MESSAGE_TYPE) { 181 break; 182 183 case TunnelDataMessage.MESSAGE_TYPE: 182 184 shortCircuitTunnelData(messageBody, fromRouterHash); 183 185 allowMatches = false; 184 } else { 186 break; 187 188 default: 185 189 // why don't we allow type 0? There used to be a message of type 0 long ago... 186 190 if ( (type > 0) && (type < _handlerJobBuilders.length) ) { … … 204 208 } 205 209 } 206 } 210 break; 211 } // switch 207 212 208 213 if (allowMatches) { … … 214 219 // was not handled via HandlerJobBuilder 215 220 _context.messageHistory().droppedOtherMessage(messageBody, (fromRouter != null ? fromRouter.calculateHash() : fromRouterHash)); 216 if (type == DeliveryStatusMessage.MESSAGE_TYPE) { 221 222 switch (type) { 223 case DeliveryStatusMessage.MESSAGE_TYPE: 217 224 // Avoid logging side effect from a horrible UDP EstablishmentManager hack 218 225 // We could set up a separate stat for it but don't bother for now … … 224 231 _context.statManager().addRateData("inNetPool.droppedDeliveryStatusDelay", timeSinceSent); 225 232 } 226 //} else if (type == TunnelCreateStatusMessage.MESSAGE_TYPE) { 227 // if (_log.shouldLog(Log.INFO)) 228 // _log.info("Dropping slow tunnel create request response: " + messageBody); 229 // _context.statManager().addRateData("inNetPool.droppedTunnelCreateStatusMessage", 1, 0); 230 } else if (type == DatabaseSearchReplyMessage.MESSAGE_TYPE) { 233 break; 234 235 case DatabaseSearchReplyMessage.MESSAGE_TYPE: 231 236 if (_log.shouldLog(Log.INFO)) 232 237 _log.info("Dropping slow db lookup response: " + messageBody); 233 238 _context.statManager().addRateData("inNetPool.droppedDbLookupResponseMessage", 1); 234 } else if (type == DatabaseLookupMessage.MESSAGE_TYPE) { 239 break; 240 241 case DatabaseLookupMessage.MESSAGE_TYPE: 235 242 if (_log.shouldLog(Log.DEBUG)) 236 243 _log.debug("Dropping netDb lookup due to throttling"); 237 } else { 244 break; 245 246 default: 238 247 if (_log.shouldLog(Log.WARN)) 239 248 _log.warn("Message expiring on " … … 242 251 new Exception("f00!")); 243 252 _context.statManager().addRateData("inNetPool.dropped", 1); 244 } 253 break; 254 } // switch 245 255 } else { 246 256 String mtype = messageBody.getClass().getName();
Note: See TracChangeset
for help on using the changeset viewer.