Closing HTTP connections properly.