Freenove / WebIOPi

WebIOPi-0.7.1 for Raspberry B+, Pi2, Pi3, and Pi4
21 stars 8 forks source link

Shutdown HTTP server correctly #1

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.

For reference: https://github.com/thortex/rpi3-webiopi/pull/57