Files
opendht/include
Cyrille Beraud b828060ac2 proxy: fix listener restart on connectivity change
When a device wakes up from Doze mode or switches networks (e.g. WiFi to 4G),
old TCP sockets may become silently dead. When connectivityChanged() is
called, the proxy client triggers a new HTTP request (getProxyInfos)
which succeeds since it uses a fresh socket, leading the client to
believe the connection is still UP.

Because the status doesn't change (Connected -> Connected),
launchConnectedCbs_ was not set, and restartListeners() was never invoked.
Consequently, push subscriptions and permanent puts were not renewed
on the proxy, causing the device to appear offline on the DHT.

This forces launchConnectedCbs_ to true on connectivityChanged, ensuring
that listeners and subscriptions are properly restarted.
2026-06-07 19:13:14 +02:00
..