Fix deadlock in rpc connections
Created by: dagurval
Thread attempts a lock on handles, while handles is locked in a join. Copy handle ids rather than holding the lock.
Created by: dagurval
Thread attempts a lock on handles, while handles is locked in a join. Copy handle ids rather than holding the lock.