Resetting endpoint_type in open_local_endpoint()