aboutsummaryrefslogtreecommitdiffstats
path: root/src/direct_bt/HCIHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/direct_bt/HCIHandler.cpp')
-rw-r--r--src/direct_bt/HCIHandler.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/direct_bt/HCIHandler.cpp b/src/direct_bt/HCIHandler.cpp
index 46e3da38..f79e86d9 100644
--- a/src/direct_bt/HCIHandler.cpp
+++ b/src/direct_bt/HCIHandler.cpp
@@ -523,7 +523,11 @@ void HCIHandler::hciReaderWork(jau::service_runner& sr) noexcept {
WARN_PRINT("dev_id %u: IO RECV Drop (%u oldest elements of %u capacity, ring full) - %s",
dev_id, dropCount, hciEventRing.capacity(), toString().c_str());
}
- hciEventRing.putBlocking( std::move( event ), jau::fractions_i64::zero );
+ if( !hciEventRing.putBlocking( std::move( event ), jau::fractions_i64::zero ) ) {
+ ERR_PRINT2("hciEventRing put: %s", hciEventRing.toString().c_str());
+ sr.set_shall_stop();
+ return;
+ }
} else if( event->isMetaEvent(HCIMetaEventType::LE_ADVERTISING_REPORT) ) {
// issue callbacks for the translated AD events
jau::darray<std::unique_ptr<EInfoReport>> eirlist = EInfoReport::read_ad_reports(event->getParam(), event->getParamSize());