Tunnels: Fix NPE in BuildHandler

This commit is contained in:
zzz
2021-11-29 12:19:02 -05:00
parent 56fdc244d4
commit cf10a2d5b6

View File

@@ -889,7 +889,8 @@ class BuildHandler implements Runnable {
if (_log.shouldWarn())
_log.warn("Dropping request (hop throttle), next hop: " + nextPeer + ": " + req);
_context.statManager().addRateData("tunnel.rejectHopThrottle", 1);
_context.commSystem().mayDisconnect(from);
if (from != null)
_context.commSystem().mayDisconnect(from);
return;
}
if (result == ParticipatingThrottler.Result.REJECT) {