I took it from peerflix; my assumption was that once the http server hits an error, it would close the server by telling it to listen on 0, but I'm not 100% sure that's the actual effect tbh.