-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Webserver stops responding to requests via webpage #98
Comments
From my own test.It doesn't show any problem you said.You can try to updata to newest version to see weather the problem is been solved or not. ps. I strongly suggest to add those code. buf = "HTTP/1.1 200 OK \r\n\r\n"; ---HTTP Header also, some of the features you use in your html code do not support by mobile version's explorer. |
Also, you don't deal with the nil problem. |
What browser are you using? Is your garbage collection in the right place? One user was using Chrome and it was requesting the page multiple times and On Sat, Jan 31, 2015 at 2:34 AM, Martin Han [email protected]
|
You may try to respond with |
is this solved? |
I don't see this issue in nodemcu-httpserver (also in GitHub). It may be worth comparing the two or even using instead to do what you are trying to do. Disclaimer: I wrote it |
Could be the problem of browser keep connection open. (Think your server is http 1.1) I found using Lua find to parse the headers is not reliable, also Lua find does not support '\r\n\r\n'. So when I was coding nodemcu-ide, I use javascript to post Lua codes to reduce memory usage: |
See #719 |
I've written a small webserver app that always works the first time I connect, and then seemingly never again.
The goal is to turn an LED on and off via a webpage. I've been watching the power draw of the module and it appears to start off drawing around 70mA at 3.3V and then bouncing around after around a minute between 18 and 30 mA.
So after a reset it boots, I can access the page, and then after a minute or so can no longer.
My nodeMcu version: NodeMcu 0.9.5 build 20150105 powered by Lua 5.1.4
I'm also using the LuaLoader app on windows for testing, but the behavior also happens when I access the page with my Android 4.4 phone.
Here's the code for reference:
The text was updated successfully, but these errors were encountered: