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!)
This commit is contained in:
jrandom
2004-07-07 22:23:25 +00:00
committed by zzz
parent a8b0d7f999
commit 9685884279

View File

@ -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;
}