Commit 46e7a72d authored by Felix Exner's avatar Felix Exner
Browse files

Added a comment about explicitly calling ReverseInterface's destructor

parent bba2ab70
......@@ -204,6 +204,11 @@ void UrDriver::startWatchdog()
LOG_INFO("Connection to robot dropped, waiting for new connection.");
// We explicitly call the destructor here, as unique_ptr.reset() creates a new object before
// replacing the pointer and destroying the old object. This will result in a resource conflict
// when trying to bind the socket.
// TODO: It would probably make sense to keep the same instance alive for the complete runtime
// instead of killing it all the time.
reverse_interface_.reset(new comm::ReverseInterface(reverse_port_));
reverse_interface_active_ = true;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment