Bug fix on shutdown_on_sigint (not set on InitOptions constructors) (#850)

Signed-off-by: Alex Fernandes Neves <alexfneves@gmail.com>
This commit is contained in:
alexfneves 2019-11-18 21:45:39 -03:00 committed by William Woodall
parent 6963c2d05a
commit 5254e6abc3

View file

@ -42,7 +42,9 @@ InitOptions::InitOptions(const rcl_init_options_t & init_options)
InitOptions::InitOptions(const InitOptions & other)
: InitOptions(*other.get_rcl_init_options())
{}
{
shutdown_on_sigint = other.shutdown_on_sigint;
}
InitOptions &
InitOptions::operator=(const InitOptions & other)
@ -53,6 +55,7 @@ InitOptions::operator=(const InitOptions & other)
if (RCL_RET_OK != ret) {
rclcpp::exceptions::throw_from_rcl_error(ret, "failed to copy rcl init options");
}
this->shutdown_on_sigint = other.shutdown_on_sigint;
}
return *this;
}