Fix sporadic hangup when stopping notifies

This commit is contained in:
Matthias Spiller committed 2020-02-21 08:17:13 +00:00
1 parent 7f96cc2ffc
commit 3bc73d5fb0
3 files changed
+12 -1

No files matched your search

@@ -682,7 +682,12 @@ bool BLECharacteristic::notify(uint16_t conn_hdl, const void* data, uint16_t len
};
LOG_LV2("CHR", "Notify %d bytes", packet_len);
VERIFY_STATUS( sd_ble_gatts_hvx(conn_hdl, &hvx_params), false );
uint32_t status = sd_ble_gatts_hvx(conn_hdl, &hvx_params);
if(NRF_SUCCESS != status)
{
conn->releaseHvnPacket();
}
VERIFY_STATUS(status, false );
remaining -= packet_len;
u8data += packet_len;