Skip to content

Commit

Permalink
shenanigans2
Browse files Browse the repository at this point in the history
  • Loading branch information
wiedehopf committed Sep 24, 2020
1 parent 2cd35e0 commit 4c1d835
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions mlat/server/jsonclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,12 @@ def handle_connection(self):
except asyncio.CancelledError:
pass

except Exception:
self.logger.exception('Exception handling client')

except OSError.ConnectionError as e:
self.logger.error(e)

except Exception:
self.logger.exception('Exception handling client')

finally:
self.close()
Expand Down
7 changes: 4 additions & 3 deletions mlat/server/tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,15 +208,16 @@ def update_interest(self, receiver):
if rp < 0.10:
continue

ratepair = (rp, r1, ac)
ratepair = (rp, r1, ac, rate)
l.append(ratepair)
ratepair_list.append(ratepair)

ratepair_list.sort()

ntotal = {}
new_sync_set = set()
for rp, r1, ac in ratepair_list:
total_rate = 0
for rp, r1, ac, rate in ratepair_list:
if ac in new_sync_set:
continue # already added

Expand All @@ -227,7 +228,7 @@ def update_interest(self, receiver):
# use this aircraft for sync
new_sync_set.add(ac)
# update rate-product totals for all receivers that see this aircraft
for rp2, r2, ac2 in ac_to_ratepair_map[ac]:
for rp2, r2, ac2, rate in ac_to_ratepair_map[ac]:
ntotal[r2] = ntotal.get(r2, 0.0) + rp2

if now - receiver.last_clock_reset < 30:
Expand Down

0 comments on commit 4c1d835

Please sign in to comment.