Avoid NPE related carsh in NetworkService when trying to add a very high latency to a malfunctioning node.

develop
Severiano Jaramillo 2018-12-15 08:51:01 -06:00
parent 0cba6a9f8d
commit 91a5ecdd7b
1 changed files with 2 additions and 1 deletions

View File

@ -710,7 +710,8 @@ public class NetworkService extends Service {
// Remove node from nodeLatencyVerifier, so that it publishes its removal
nodeLatencyVerifier.removeNode(mSelectedNode);
} else {
// Avoid crash #133
} else if (mSelectedNode != null){
// Adding a very high latency value to this node in order to prevent
// us from getting it again
mSelectedNode.addLatencyValue(Long.MAX_VALUE);