Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
serious-scribbler opened this issue Jun 30, 2021 · 1 comment

Comments

@serious-scribbler
Copy link

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 serious-scribbler changed the title MicroWebSrv.Start never terminates when theaded=False and Stop() is called MicroWebSrv.Start never terminates when threaded=False and Stop() is called Jun 30, 2021
@jczic
Copy link
Owner

jczic commented Sep 17, 2022

👍🏻 @serious-scribbler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants