three related issues with monitor_network_changes and monitor_device_changes:
no way to stop monitors
both functions create a watch::channel internally but never expose the sender. there's no public api to gracefully shut down monitoring — the only way out is dropping the task.
wifi hotplug missed
monitor_network_changes subscribes to wifi devices present at startup. a usb wifi adapter plugged in later won't have its AP change signals picked up — there's no DeviceAdded handler to attach new NMWirelessProxy streams.
exit is always an error
both monitors always return Err(ConnectionError::Stuck("monitoring stream ended")) regardless of why they stopped (monitoring/network.rs:88-108, monitoring/device.rs:82-102). callers can't distinguish a clean stop from a real failure.
there's also a redundant while let Some drain loop after the main select! loop that fires callbacks after the shutdown signal was already received.
three related issues with
monitor_network_changesandmonitor_device_changes:no way to stop monitors
both functions create a
watch::channelinternally but never expose the sender. there's no public api to gracefully shut down monitoring — the only way out is dropping the task.wifi hotplug missed
monitor_network_changessubscribes to wifi devices present at startup. a usb wifi adapter plugged in later won't have its AP change signals picked up — there's noDeviceAddedhandler to attach newNMWirelessProxystreams.exit is always an error
both monitors always return
Err(ConnectionError::Stuck("monitoring stream ended"))regardless of why they stopped (monitoring/network.rs:88-108,monitoring/device.rs:82-102). callers can't distinguish a clean stop from a real failure.there's also a redundant
while let Somedrain loop after the mainselect!loop that fires callbacks after the shutdown signal was already received.