* i2psnark:

- Drop incoming connections on HTTP port
   - Define port 6881 in one place
   - Don't let random DHT port be 6881
   - Exception tweak
This commit is contained in:
zzz
2013-10-24 20:52:37 +00:00
parent 80fdf4e917
commit 9d3925eb20
6 changed files with 25 additions and 11 deletions

View File

@@ -324,6 +324,8 @@ public class I2PSnarkUtil {
if (_banlist.contains(dest))
throw new IOException("Not trying to contact " + dest.toBase64() + ", as they are banlisted");
try {
// TODO opts.setPort(xxx); connect(addr, opts)
// DHT moved above 6881 in 0.9.9
I2PSocket rv = _manager.connect(addr);
if (rv != null)
_banlist.remove(dest);
@@ -331,7 +333,9 @@ public class I2PSnarkUtil {
} catch (I2PException ie) {
_banlist.add(dest);
_context.simpleScheduler().addEvent(new Unbanlist(dest), 10*60*1000);
throw new IOException("Unable to reach the peer " + peer + ": " + ie.getMessage());
IOException ioe = new IOException("Unable to reach the peer " + peer);
ioe.initCause(ie);
throw ioe;
}
}