1
0
mirror of https://gitlab.com/obbart/universal_robots_ros_driver.git synced 2026-04-10 01:50:46 +02:00

Fixed tcp socket: shutdown() does not destroy socket descriptor -> use close()

This commit is contained in:
axelschroth
2018-05-18 13:54:45 +02:00
committed by Jakub
parent 924c371041
commit c72ec5bded

View File

@@ -90,7 +90,7 @@ void TCPSocket::close()
if (state_ != SocketState::Connected) if (state_ != SocketState::Connected)
return; return;
state_ = SocketState::Closed; state_ = SocketState::Closed;
::shutdown(socket_fd_, SHUT_RDWR); ::close(socket_fd_);
socket_fd_ = -1; socket_fd_ = -1;
} }
@@ -164,4 +164,4 @@ bool TCPSocket::write(const uint8_t *buf, size_t buf_len, size_t &written)
} }
return true; return true;
} }