From 9685884279cf8ded1e590e3a4a3222144df2b4d1 Mon Sep 17 00:00:00 2001 From: jrandom Date: Wed, 7 Jul 2004 22:23:25 +0000 Subject: [PATCH] deal with null peer (used by the SubmitMessageHistoryJob to bw limit the history) current 0.3.2 throws an NPE which causes the submitMessageHistory functionality to fail, which isn't really a loss since i send that data to /dev/null at the moment ;) (but you'll want to router.keepHistory=false and router.submitHistory=false) this'll go into the next rev, whenever it comes out (thanks ugha!) --- .../net/i2p/router/transport/BandwidthLimitedInputStream.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/router/java/src/net/i2p/router/transport/BandwidthLimitedInputStream.java b/router/java/src/net/i2p/router/transport/BandwidthLimitedInputStream.java index 2921e1e7f..8afea798f 100644 --- a/router/java/src/net/i2p/router/transport/BandwidthLimitedInputStream.java +++ b/router/java/src/net/i2p/router/transport/BandwidthLimitedInputStream.java @@ -32,7 +32,8 @@ public class BandwidthLimitedInputStream extends FilterInputStream { super(source); _context = context; _peer = peer; - _peerSource = peer.getHash().toBase64(); + if (peer != null) + _peerSource = peer.getHash().toBase64(); _pullFromOutbound = pullFromOutbound; }