change try_update to compare_and_swap

remove try_update and use compare and swap.  previously a race condition might have existed.
By changing to compare_and_swap we can have it only set the client if the variable is currently nil.