event handler should not affect internal state

pull/13759/head
Paul Szczeanek 2020-09-17 12:26:34 +01:00 committed by Vincent Coubard
parent 685af00fd5
commit 0a3cd69fc6
1 changed files with 4 additions and 3 deletions

View File

@ -2333,13 +2333,14 @@ void Gap::on_enhanced_connection_complete(
clock_accuracy_t master_clock_accuracy
)
{
if (own_role == connection_role_t::CENTRAL) {
_initiating = false;
}
if (!_event_handler) {
return;
}
if (own_role == connection_role_t::CENTRAL) {
_initiating = false;
}
_event_handler->onConnectionComplete(
ConnectionCompleteEvent(