BLE: Force stop scan before connection initiation.

pull/6188/head
Vincent Coubard 2018-02-21 12:13:24 +00:00
parent c5be493bb7
commit 9c6f44de91
1 changed files with 3 additions and 0 deletions

View File

@ -503,6 +503,9 @@ ble_error_t GenericGap::connect(
// TODO fix upper layer API, address type factorization is incorrect.
// Force scan stop before initiating the scan used for connection
stopScan();
return _pal_gap.create_connection(
scanParams->getInterval(),
scanParams->getWindow(),