SR-G / sleep-on-lan

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.
Apache License 2.0
332 stars 25 forks source link

Response not returned before command executed #21

Closed miked1313 closed 3 years ago

miked1313 commented 5 years ago

I am using sol.exe with the Windows sleep command in Example 2.

"Commands" : [ { "Operation" : "sleep", "Command" : "C:\\Windows\\System32\\rundll32.exe powrprof.dll,SetSuspendState 0,1,1" }]

I use a PHP WakeOnLan/SleepOnLan web app on a Raspberry Pi which expects a HTTP response to know if the sleep request was successful or not. The problem I'm seeing is that my computer is going to sleep before the RaspberryPi receives the HTTP response back so the request times out even though sol.exe successfully puts the computer to sleep. Is there any way for the HTTP response to be sent before the sleep command is executed? Thank you.