File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
libraries/Bluefruit52Lib/src Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -184,20 +184,20 @@ void BLEGatt::_eventHandler(ble_evt_t* evt)
184
184
if ( evt_id == BLE_GAP_EVT_DISCONNECTED )
185
185
{
186
186
// Client
187
- for (uint8_t i=0 ; i<_client.svc_count ; i++)
187
+ for (uint8_t i=0 ; i<_client.chr_count ; i++)
188
188
{
189
- if ( evt_conn_hdl == _client.svc_list [i]->_conn_hdl )
189
+ if ( evt_conn_hdl == _client.chr_list [i]->connHandle () )
190
190
{
191
- _client.svc_list [i]->disconnect ();
191
+ _client.chr_list [i]->disconnect ();
192
192
}
193
193
}
194
194
195
195
// TODO merge to above loop
196
- for (uint8_t i=0 ; i<_client.chr_count ; i++)
196
+ for (uint8_t i=0 ; i<_client.svc_count ; i++)
197
197
{
198
- if ( evt_conn_hdl == _client.chr_list [i]->connHandle () )
198
+ if ( evt_conn_hdl == _client.svc_list [i]->_conn_hdl )
199
199
{
200
- _client.chr_list [i]->disconnect ();
200
+ _client.svc_list [i]->disconnect ();
201
201
}
202
202
}
203
203
}
You can’t perform that action at this time.
0 commit comments