mirror of https://github.com/ARMmbed/mbed-os.git
event handler should not affect internal state
parent
685af00fd5
commit
0a3cd69fc6
|
@ -2333,13 +2333,14 @@ void Gap::on_enhanced_connection_complete(
|
||||||
clock_accuracy_t master_clock_accuracy
|
clock_accuracy_t master_clock_accuracy
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
if (own_role == connection_role_t::CENTRAL) {
|
||||||
|
_initiating = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (!_event_handler) {
|
if (!_event_handler) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (own_role == connection_role_t::CENTRAL) {
|
|
||||||
_initiating = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
_event_handler->onConnectionComplete(
|
_event_handler->onConnectionComplete(
|
||||||
ConnectionCompleteEvent(
|
ConnectionCompleteEvent(
|
||||||
|
|
Loading…
Reference in New Issue