Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bigprint
Universal_Robots_ROS_Driver
Commits
46e7a72d
Commit
46e7a72d
authored
Jan 28, 2020
by
Felix Exner
Browse files
Added a comment about explicitly calling ReverseInterface's destructor
parent
bba2ab70
Changes
1
Hide whitespace changes
Inline
Side-by-side
ur_robot_driver/src/ur/ur_driver.cpp
View file @
46e7a72d
...
...
@@ -204,6 +204,11 @@ void UrDriver::startWatchdog()
LOG_INFO
(
"Connection to robot dropped, waiting for new connection."
);
handle_program_state_
(
false
);
// 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_
->~
ReverseInterface
();
reverse_interface_
.
reset
(
new
comm
::
ReverseInterface
(
reverse_port_
));
reverse_interface_active_
=
true
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment