Fix http server closing