mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-30 02:31:44 +00:00
TCPStream: Shutdown on close.
This commit is contained in:
@@ -72,8 +72,10 @@ std::size_t TCPStream::receive(char* buffer, std::size_t len, Error* err,
|
||||
}
|
||||
|
||||
void TCPStream::close() {
|
||||
if (m_sd >= 0)
|
||||
if (m_sd >= 0) {
|
||||
::shutdown(m_sd, SHUT_RDWR);
|
||||
::close(m_sd);
|
||||
}
|
||||
m_sd = -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user