Wasting sockets if connection cannot established
Status: Beta
Brought to you by:
lassowski
Hi,
first of all let me thank you for your great work. I have a SolarMax 4200S for several days and Solarmax-Logger is running.
I figured out some issues and would like to share my fixes to give something back.
Here is the first one:
If smw-logger was started and could not connect to SolarMax (because it is not online) it will open new socket in a loop every minute. The already opened one will be lost, because variable will be overwritten by new one.
Also one error case (line 344) has this issue.
Please find patch attached.
Bye,
Erik
Added some close() calls for socket