Multi-platform process allowing to sleep on LAN a linux or windows computer, through wake-on-lan (reversed) magic packets or through HTTP REST requests.
When receiving an invalid packet sleep-on-lan logs an error, but still proceeds with comparing an empty string and sending the PC to sleep. Something is sending 0 len packets on my system and my PC goes to sleep randomly. These changes fix the issue.
I'm not a Go dev, so not 100% sure that what I'm doing is correct, but I tested for a while and everything seems to work
When receiving an invalid packet sleep-on-lan logs an error, but still proceeds with comparing an empty string and sending the PC to sleep. Something is sending 0 len packets on my system and my PC goes to sleep randomly. These changes fix the issue.
I'm not a Go dev, so not 100% sure that what I'm doing is correct, but I tested for a while and everything seems to work