NanoHttpd / nanohttpd

Tiny, easily embeddable HTTP server in Java.
http://nanohttpd.org
BSD 3-Clause "New" or "Revised" License
6.89k stars 1.69k forks source link

Refuse connection and timeout #646

Open t104360088 opened 2 weeks ago

t104360088 commented 2 weeks ago

Hi, I have an Android application, running nanohttpd on it to provide web pages to the browser under LAN, but I encountered a very strange problem.

Sometimes the browser will show the connection refuse or the connection times out, but at this time I use another PC to request the web page from server and get a normal response. After a while, the PC that was originally unable to connect can get the web page again. Does anyone have any ideas about this problem?

tejmagar commented 3 days ago

I was facing similar problems where connection disconnects and large file upload fails. Try running the server in foregorund service.

Looks like this library is no more maintained so I tried to make my own http server library. https://github.com/tejmagar/tinyweb