This commit is contained in:
J. Nick Koston 2025-07-16 13:10:00 -10:00
parent 94fd2d8ca1
commit f1d2300153
No known key found for this signature in database
2 changed files with 2 additions and 8 deletions

View File

@ -39,15 +39,14 @@ LwIPLock::LwIPLock() {
// Only lock if we're not already in the TCPIP thread // Only lock if we're not already in the TCPIP thread
if (!sys_thread_tcpip(LWIP_CORE_LOCK_QUERY_HOLDER)) { if (!sys_thread_tcpip(LWIP_CORE_LOCK_QUERY_HOLDER)) {
LOCK_TCPIP_CORE(); LOCK_TCPIP_CORE();
locked_ = true;
} }
#endif #endif
} }
LwIPLock::~LwIPLock() { LwIPLock::~LwIPLock() {
#ifdef CONFIG_LWIP_TCPIP_CORE_LOCKING #ifdef CONFIG_LWIP_TCPIP_CORE_LOCKING
// Only unlock if we locked it // Only unlock if we hold the lock
if (locked_ && sys_thread_tcpip(LWIP_CORE_LOCK_QUERY_HOLDER)) { if (sys_thread_tcpip(LWIP_CORE_LOCK_QUERY_HOLDER)) {
UNLOCK_TCPIP_CORE(); UNLOCK_TCPIP_CORE();
} }
#endif #endif

View File

@ -695,11 +695,6 @@ class LwIPLock {
public: public:
LwIPLock(); LwIPLock();
~LwIPLock(); ~LwIPLock();
protected:
#if defined(USE_ESP32)
bool locked_{false};
#endif
}; };
/** Helper class to request `loop()` to be called as fast as possible. /** Helper class to request `loop()` to be called as fast as possible.