Make recurrent rpdb session handling thread-safe.