mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
pkg/nimble/autoconn: stop scan/adv on NETIF_ABORT_SLAVE
When a connection is aborted and the node in question is a slave then it can be advertising/scanning at the time. The incoming event triggers the state to be changed to IDLE but ongoing adv/scan which will cause 'nimble_netif_conn_start_adv' to fail to allocate a handle as the netif will still be busy. Therefore when stop scan/stop before switching the state.
This commit is contained in:
parent
54a76ab2ce
commit
3361f92202
@ -215,7 +215,7 @@ static void _on_netif_evt(int handle, nimble_netif_event_t event,
|
||||
break;
|
||||
case NIMBLE_NETIF_ABORT_SLAVE:
|
||||
_evt_dbg("ABORT slave", handle, addr);
|
||||
_state = STATE_IDLE;
|
||||
_deactivate();
|
||||
break;
|
||||
case NIMBLE_NETIF_CONN_UPDATED:
|
||||
_evt_dbg("UPDATED", handle, addr);
|
||||
|
Loading…
Reference in New Issue
Block a user