MicroWebSrv
MicroWebSrv copied to clipboard
MicroWebSrv.Start never terminates when threaded=False and Stop() is called
When Stop is called from a route handler in un-threaded mode, Start() never terminates. An important thing to note is that I'm running the module on ESP8266 (precompiled using the cross compiler) and removed the import of _thread and replaced the content of _startThread() with return True
, since it isn't needed and was using _thread.
I fixed this in my own copy by changing the following line of _serverProcess()
from
while True:
to while self._started:
and adding self._started = False
to Stop().
👍🏻 @serious-scribbler