Commit 68819a08 authored by Karsten Loesing's avatar Karsten Loesing
Browse files

Fix the "running" field in bridge details documents.

When we set this field in the update process, we only looked whether
the bridge is contained in the last known bridge network status. We
also need to check whether it has the "Running" flag assigned there.

This is different from relays, because the consensus only lists relays
with the "Running" flag since a couple of years, whereas the bridge
network status lists all known bridges.

Fixes #23467. Spotted by nusenu.
parent 5c01d8b4
# Changes in version 4.?-?.?.? - 2017-??-?? # Changes in version 4.?-?.?.? - 2017-??-??
* Medium changes
- Only set the "running" field in a bridge's details document to
true if the bridge is both contained in the last known bridge
network status and has the "Running" flag assigned there.
* Minor changes * Minor changes
- Remove placeholder page on index.html. - Remove placeholder page on index.html.
......
...@@ -863,7 +863,8 @@ public class NodeDetailsStatusUpdater implements DescriptorListener, ...@@ -863,7 +863,8 @@ public class NodeDetailsStatusUpdater implements DescriptorListener,
} }
detailsStatus.setRelay(nodeStatus.isRelay()); detailsStatus.setRelay(nodeStatus.isRelay());
detailsStatus.setRunning(nodeStatus.getLastSeenMillis() detailsStatus.setRunning(nodeStatus.getRelayFlags().contains("Running")
&& nodeStatus.getLastSeenMillis()
== (nodeStatus.isRelay() ? this.relaysLastValidAfterMillis == (nodeStatus.isRelay() ? this.relaysLastValidAfterMillis
: this.bridgesLastPublishedMillis)); : this.bridgesLastPublishedMillis));
detailsStatus.setNickname(nodeStatus.getNickname()); detailsStatus.setNickname(nodeStatus.getNickname());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment