aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api/direct_bt/DBTManager.hpp4
-rw-r--r--api/direct_bt/GATTHandler.hpp4
-rw-r--r--src/direct_bt/GATTHandler.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/api/direct_bt/DBTManager.hpp b/api/direct_bt/DBTManager.hpp
index 3ff86ca3..dcca32ff 100644
--- a/api/direct_bt/DBTManager.hpp
+++ b/api/direct_bt/DBTManager.hpp
@@ -61,8 +61,8 @@ namespace direct_bt {
/* BT Core Spec v5.2: Vol 3, Part F 3.2.8: Maximum length of an attribute value. */
ClientMaxMTU = 512,
- /** 10s poll timeout for mgmt reader thread */
- MGMT_READER_THREAD_POLL_TIMEOUT = 10000,
+ /** 3s poll timeout for mgmt reader thread */
+ MGMT_READER_THREAD_POLL_TIMEOUT = 3000,
MGMTEVT_RING_CAPACITY = 256
};
diff --git a/api/direct_bt/GATTHandler.hpp b/api/direct_bt/GATTHandler.hpp
index 97feece9..fcfc5f0a 100644
--- a/api/direct_bt/GATTHandler.hpp
+++ b/api/direct_bt/GATTHandler.hpp
@@ -128,8 +128,8 @@ namespace direct_bt {
/* BT Core Spec v5.2: Vol 3, Part G GATT: 5.2.1 ATT_MTU */
DEFAULT_MIN_ATT_MTU = 23,
- /** 10s poll timeout for l2cap reader thread */
- L2CAP_READER_THREAD_POLL_TIMEOUT = 10000,
+ /** 3s poll timeout for l2cap reader thread */
+ L2CAP_READER_THREAD_POLL_TIMEOUT = 3000,
ATTPDU_RING_CAPACITY = 256
};
diff --git a/src/direct_bt/GATTHandler.cpp b/src/direct_bt/GATTHandler.cpp
index 998c9119..6f426bc7 100644
--- a/src/direct_bt/GATTHandler.cpp
+++ b/src/direct_bt/GATTHandler.cpp
@@ -115,7 +115,7 @@ void GATTHandler::l2capReaderThreadImpl() {
break;
}
- len = l2cap->read(rbuffer.get_wptr(), rbuffer.getSize(), Defaults::L2CAP_READER_THREAD_POLL_TIMEOUT);
+ len = l2cap->read(rbuffer.get_wptr(), rbuffer.getSize(), timeoutMS);
if( 0 < len ) {
const AttPDUMsg * attPDU = AttPDUMsg::getSpecialized(rbuffer.get_ptr(), len);
const AttPDUMsg::Opcode opc = attPDU->getOpcode();