Skip to content

Commit

Permalink
fix: reset loop if any tunnel interface is not passing traffic
Browse files Browse the repository at this point in the history
  • Loading branch information
ab77 committed Dec 1, 2023
1 parent 765b2fa commit 8ceabef
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions unzoner/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,8 @@ def main():
)
)

if i % POLL_FREQ == 0 and s_local[idx]: # every x cycles per loop
# check if server tunnel interface(s) are still passing traffic (assume not)
if i % POLL_FREQ == 0: # every x cycles per loop
s_loss[idx] = 100
try:
s_loss[idx] = ping_host(host=s_local[idx])
Expand Down Expand Up @@ -647,7 +648,8 @@ def main():
)
)

if i % POLL_FREQ == 0 and c_gwip:
# check if client side tunnel is still passing traffic (assume not)
if i % POLL_FREQ == 0: # every x cycles per loop
c_loss = 100
try:
c_loss = ping_host(host=c_gwip)
Expand Down

0 comments on commit 8ceabef

Please sign in to comment.