thortex / rpi3-webiopi

WebIOPi for Raspberry Pi 1, 2, 3, and zero
https://thortex.github.io/rpi3-webiopi/
Apache License 2.0
60 stars 20 forks source link

Shutdown HTTP server correctly #57

Closed MichaIng closed 3 years ago

MichaIng commented 3 years ago

At least since Python 2.7, server_close() won't stop the HTTP server, leading to an infinite hanging WebIOPi on stop, with 100% CPU usage. Only SIGKILL is able to kill it in this state. shutdown() needs to be used to stop a serve_forever() HTTP server.

Additionally trailing spaces, spaces from empty lines and doubled newlines have been removed from the script.

Solves: #48 #52 #53