MicroWebSrv icon indicating copy to clipboard operation
MicroWebSrv copied to clipboard

MicroWebSrv.Start never terminates when threaded=False and Stop() is called

Open serious-scribbler opened this issue 3 years ago • 1 comments

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 avatar Jun 30 '21 15:06 serious-scribbler

👍🏻 @serious-scribbler

jczic avatar Sep 17 '22 19:09 jczic