c6a8da61f7
See #3960 for more details of the problem and the solution. I only implemented what was proposed in this ticket, as it solves my problem, which was the same as in this ticket. Credits for the code going to @etrinh ;-) This also is a more consistence behaviour compared to esp8266, where it also is possible to restart the wifiserver immediately on the same port.