diff --git a/include/redox/client.hpp b/include/redox/client.hpp index f8f670d..9a1ec1d 100644 --- a/include/redox/client.hpp +++ b/include/redox/client.hpp @@ -400,7 +400,7 @@ Command &Redox::createCommand(const std::vector &cmd, } } - auto *c = new Command(this, std::atomic_fetch_add(commands_created_, 1), cmd, + auto *c = new Command(this, commands_created_.fetch_add(1), cmd, callback, repeat, after, free_memory, logger_); std::lock_guard lg(queue_guard_);