From ac397a60c89a7824650b3793c110b66b8bb901da Mon Sep 17 00:00:00 2001 From: Jan Baraniewski Date: Wed, 1 May 2024 16:45:01 +0200 Subject: [PATCH] Add missing handler call --- src/VirtualSerialPort.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/VirtualSerialPort.cpp b/src/VirtualSerialPort.cpp index 0989d25..cf1ddbb 100644 --- a/src/VirtualSerialPort.cpp +++ b/src/VirtualSerialPort.cpp @@ -121,7 +121,7 @@ void VirtualSerialPort::async_read(boost::asio::mutable_buffer buffer, std::func bytes_read = read(master_fd_.native_handle(), buffer.data(), sizeof(buffer_) - 1); if (bytes_read == -1) { std::cerr << "Error reading from PTY: " << strerror(errno) << std::endl; - return; + handler(boost::system::error_code(), -1); } buffer_[bytes_read] = '\0'; // Null-terminate string