As mentioned in https://github.com/ros-drivers/transport_drivers/issues/87, the fix to close the port in case of an error leads to the destructor trying to close it even though it has already been closed. As a simple solution, in the destructor we check, whether the port is still open or not.
Note: I forgot to pull changes first and had some mistakes in the first pull request, you can ignore it.
As mentioned in https://github.com/ros-drivers/transport_drivers/issues/87, the fix to close the port in case of an error leads to the destructor trying to close it even though it has already been closed. As a simple solution, in the destructor we check, whether the port is still open or not.
Note: I forgot to pull changes first and had some mistakes in the first pull request, you can ignore it.