Add thread locking to improve stability. (#585)

* Add thread locking to improve stability.

* Do not use thread locking with the ESP8266, but instead use an empty placeholder class that can be used to implement locking at a later date.
This commit is contained in:
matt123p
2019-09-12 19:56:13 +03:00
committed by Me No Dev
parent f0a1c3d486
commit aea43f98d1
3 changed files with 95 additions and 0 deletions
+4
View File
@@ -31,6 +31,8 @@
#endif
#include <ESPAsyncWebServer.h>
#include "AsyncWebSynchronization.h"
#ifdef ESP8266
#include <Hash.h>
#endif
@@ -236,6 +238,8 @@ class AsyncWebSocket: public AsyncWebHandler {
uint32_t _cNextId;
AwsEventHandler _eventHandler;
bool _enabled;
AsyncWebLock _lock;
public:
AsyncWebSocket(const String& url);
~AsyncWebSocket();