diff --git a/src/tcp_socket.cpp b/src/tcp_socket.cpp index 619151a..6a057bd 100644 --- a/src/tcp_socket.cpp +++ b/src/tcp_socket.cpp @@ -90,7 +90,7 @@ void TCPSocket::close() if (state_ != SocketState::Connected) return; state_ = SocketState::Closed; - ::shutdown(socket_fd_, SHUT_RDWR); + ::close(socket_fd_); socket_fd_ = -1; } @@ -164,4 +164,4 @@ bool TCPSocket::write(const uint8_t *buf, size_t buf_len, size_t &written) } return true; -} \ No newline at end of file +}