This commit is contained in:
Robert Chacón 2023-03-30 18:22:38 -06:00 committed by GitHub
parent 41b86b6a87
commit 6552e8ec29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -331,10 +331,11 @@ def getCircuitLatencyStats(subscriberCircuits):
# If we can't identify RTT this time around, use most recently recorded RTT
# None by default, change if found in priorQuery
circuit['stats']['sinceLastQuery']['tcpLatency'] = None
if 'priorQuery' in circuit['stats'] and circuit['stats']['priorQuery'] != None:
if 'priorQuery' in circuit['stats']:
if 'tcpLatency' in circuit['stats']['priorQuery']:
circuit['stats']['sinceLastQuery']['tcpLatency'] = circuit['stats']['priorQuery']['tcpLatency']
if 'priorQuery' in circuit['stats']:
if circuit['stats']['priorQuery'] != None:
if 'priorQuery' in circuit['stats']:
if 'tcpLatency' in circuit['stats']['priorQuery']:
circuit['stats']['sinceLastQuery']['tcpLatency'] = circuit['stats']['priorQuery']['tcpLatency']
return subscriberCircuits