0

Have a nodejs - socketio application kiosk running windows 7 in kiosk mode(desktop).

Occasionally on boot a handshake doesn't occur between socketio and the client app also running on the same pc. There is a connection but it is immediately dropped. This happens randomly roughly 5% of the time on reboot

The only way I've been able to reliably get the handshake working is to manually reboot the pc.

I can see the nodejs trace showing the lost connection when the error occurs. I was wondering is there was a way for nodejs to dynamically reboot its host pc (in this case running Windows 7)?

Bachalo
  • 5,885
  • 22
  • 86
  • 175

1 Answers1

1

Windows has the shutdown command: How do I shutdown - restart - logoff Windows via a bat file?

You should be able to spawn an process to execute that.

theGleep
  • 1,031
  • 7
  • 14