[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [stem/master] Fix exit port counts



commit db311d101d9c07e081bafcb756c868f7e0b3cbf4
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Fri Dec 22 14:07:21 2017 -0800

    Fix exit port counts
    
    Grrr, I made a mistake similar to this earlier. Caught thanks to toralf.
---
 docs/_static/example/relay_connections.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/_static/example/relay_connections.py b/docs/_static/example/relay_connections.py
index 42c22fa5..5b80caf8 100755
--- a/docs/_static/example/relay_connections.py
+++ b/docs/_static/example/relay_connections.py
@@ -110,7 +110,7 @@ def main():
     total_ipv4, total_ipv6 = 0, 0
 
     for port in sorted(exit_connections):
-      ipv4_count = len([conn for conn in connections if is_valid_ipv4_address(conn.remote_address)])
+      ipv4_count = len([conn for conn in exit_connections if is_valid_ipv4_address(conn.remote_address)])
       ipv6_count = len(exit_connections) - ipv4_count
       total_ipv4, total_ipv6 = total_ipv4 + ipv4_count, total_ipv6 + ipv6_count
 

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits