Skip to content

Commit

Permalink
Merge pull request #4 from kokseen1/fix_keyerror
Browse files Browse the repository at this point in the history
fix: delete from `virtual_ip_map` only if present
  • Loading branch information
kokseen1 authored Jan 12, 2024
2 parents 3b7d440 + e36e644 commit 807dfbe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions iro/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,9 @@ def disconnect(sid):

virtual_ip = virtual_ip_map.get(sid)
if sid is not None:
vip_map_value = virtual_ip_map.get(virtual_ip)
del virtual_ip_map[vip_map_value]
del virtual_ip_map[virtual_ip]
del virtual_ip_map[sid]
vip_map_value = virtual_ip_map.pop(virtual_ip, None)
virtual_ip_map.pop(vip_map_value, None)
virtual_ip_map.pop(sid, None)


for rnat_key, rnat_value in return_nat.copy().items():
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import pathlib
import subprocess

__version__ = "1.1.9"
__version__ = "1.1.10"

# The main interface is through Pybind11Extension.
# * You can add cxx_std=11/14/17, and then build_ext can be removed.
Expand Down

0 comments on commit 807dfbe

Please sign in to comment.