SSU: Avoid outbound connections to routers that disconnect quickly

This commit is contained in:
zzz
2021-02-24 11:10:40 -05:00
parent 7f3f46c8ba
commit e63e9c58a8

View File

@@ -1965,6 +1965,16 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
return null;
}
// c++ bug thru 2.36.0/0.9.49, will disconnect inbound session after 5 seconds
if (addr.getCost() == 10) {
if (VersionComparator.comp(toAddress.getVersion(), "0.9.49") <= 0) {
//if (_log.shouldDebug())
// _log.debug("Not bidding to: " + toAddress);
markUnreachable(to);
return null;
}
}
// Check for supported sig type
SigType type = toAddress.getIdentity().getSigType();
if (type == null || !type.isAvailable()) {