Resetting connection flags in close_local_endpoint()