Open amotl opened 1 year ago
I discovered a few other network-related issues here. Maybe those are related, or GH-33 fixes the problem already?
At ^2, I've recommended to improve the code base a bit.
At this spot, Python code is defined at the module level within the webserver.py
file, so it is already invoked when the modules are being loaded. This should be avoided.
The code should be encapsulated into a function that is only called when it makes sense, i.e. when the "network is there" [^3]. Perhaps the enable_ap()
function could be used?
https://github.com/Hiverize/FiPy/blob/01b403bf97fd48a35d865423a8410dc89c3a0df4/main.py#L293-L306
[^3]: A module can contain executable statements as well as function definitions. These statements are intended to initialize the module. They are executed only the first time the module name is encountered in an import statement. -- https://docs.python.org/3/tutorial/modules.html#more-on-modules
Hi there,
@didilamken reported at ^1:
With kind regards, Andreas.