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)
184184 if ( evt_id == BLE_GAP_EVT_DISCONNECTED )
185185 {
186186 // Client
187- for (uint8_t i=0 ; i<_client.svc_count ; i++)
187+ for (uint8_t i=0 ; i<_client.chr_count ; i++)
188188 {
189- if ( evt_conn_hdl == _client.svc_list [i]->_conn_hdl )
189+ if ( evt_conn_hdl == _client.chr_list [i]->connHandle () )
190190 {
191- _client.svc_list [i]->disconnect ();
191+ _client.chr_list [i]->disconnect ();
192192 }
193193 }
194194
195195 // 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++)
197197 {
198- if ( evt_conn_hdl == _client.chr_list [i]->connHandle () )
198+ if ( evt_conn_hdl == _client.svc_list [i]->_conn_hdl )
199199 {
200- _client.chr_list [i]->disconnect ();
200+ _client.svc_list [i]->disconnect ();
201201 }
202202 }
203203 }
You can’t perform that action at this time.
0 commit comments