Merge pull request #29 from torlando-tech/fix/cleanup-stale-interface-memory-leak
fix(ble): Clean up address_to_identity in _cleanup_stale_interface()
This commit is contained in:
commit
d8c76df20f
2 changed files with 5 additions and 2 deletions
|
|
@ -380,7 +380,8 @@ if [[ "$ARCH" == "armhf" ]] || [[ "$(uname -m)" =~ ^(armv6l|armv7l)$ ]]; then
|
|||
print_info "This saves ~20 minutes of compilation time on Pi Zero W"
|
||||
|
||||
WHEEL_URL="https://github.com/torlando-tech/ble-reticulum/releases/download/armv6l-wheels-v1/dbus_fast-2.44.5-cp313-cp313-linux_armv6l.whl"
|
||||
WHEEL_FILE="/tmp/dbus_fast-armv6l-$$.whl"
|
||||
# Use proper wheel filename - pip extracts metadata from the filename
|
||||
WHEEL_FILE="/tmp/dbus_fast-2.44.5-cp313-cp313-linux_armv6l.whl"
|
||||
|
||||
if curl -sL "$WHEEL_URL" -o "$WHEEL_FILE" 2>/dev/null; then
|
||||
if [ -f "$WHEEL_FILE" ] && [ -s "$WHEEL_FILE" ]; then
|
||||
|
|
|
|||
|
|
@ -1036,9 +1036,11 @@ class BLEInterface(Interface):
|
|||
old_interface.detach()
|
||||
RNS.log(f"{self} detached stale interface for {identity_hash[:8]}", RNS.LOG_DEBUG)
|
||||
|
||||
# Clean up address mappings
|
||||
# Clean up address mappings (both directions)
|
||||
if identity_hash in self.identity_to_address:
|
||||
del self.identity_to_address[identity_hash]
|
||||
if old_address in self.address_to_identity:
|
||||
del self.address_to_identity[old_address]
|
||||
|
||||
# Clean up fragmenter/reassembler for old address
|
||||
if peer_identity:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue