diff options
author | Dario Nieuwenhuis <dirbaio@dirbaio.net> | 2020-09-15 00:09:42 +0200 |
---|---|---|
committer | Dario Nieuwenhuis <dirbaio@dirbaio.net> | 2020-09-15 00:09:42 +0200 |
commit | d810e7bf93cca08d8b92d608f5535e3e1abc52bf (patch) | |
tree | 885139c9ea0138cb242b2c1f00627c7e89089e66 /examples/src/bin/ble_bas_peripheral.rs | |
parent | 35ac1d84210c04a7a86a74b21a3fc4978a8affd3 (diff) | |
download | nrf-softdevice-d810e7bf93cca08d8b92d608f5535e3e1abc52bf.zip |
Add Connection.detach() to avoid auto-disconnect on drop
Diffstat (limited to 'examples/src/bin/ble_bas_peripheral.rs')
-rw-r--r-- | examples/src/bin/ble_bas_peripheral.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/src/bin/ble_bas_peripheral.rs b/examples/src/bin/ble_bas_peripheral.rs index f148005..b330b91 100644 --- a/examples/src/bin/ble_bas_peripheral.rs +++ b/examples/src/bin/ble_bas_peripheral.rs @@ -103,6 +103,9 @@ async fn bluetooth_task(sd: &'static Softdevice) { .dewrap(); info!("advertising done!"); + + // Detach the connection so it isn't disconnected when dropped. + conn.detach(); } } |