lWS
lWS copied to clipboard
Server on tethering working only with cellular connection.
When I start server after enabling tethering with cellural connection off it gives these messeges immediatly after starting:
I: Web server address http://192.168.43.1:8080 I: Web server stopped because WiFi disconnected. I: Socket closed
When I do the same thing with cellular connection on it is working correctly.
I am using the version that is the latest currently available on F-droid (7.00.00).
Thank you for bug report. I can reproduce it also. I will do my best to fix it.
I am very interested in this use case also, i.e. personal hotspot on Android device with no WiFi or cellular connection whatsoever, and lWS as web server accessible via the personal hotspot.
This is a crucial scenario to support IMHO.
Is there a chance this will be fixed?
It seems https://github.com/bodeme/androidwebserver/blob/a35c179e31c68afc3712b8ff3aa57fe0f9d7987b/app/src/main/java/net/basov/lws/ServerService.java#L101 is the culprit.
If we would conditionalize stopping the server with a flag toggled by a checkbox 'Keep server running when offline', the behaviour desired in this issue could be achieved in a settable fashion.
@mvbasov Is this analysis correct, or is there more to it?
The main reason is protect from start connection on home network and move to public network. The web server has no any security.