Fix handling of HTTP shutdown, client disconnect