fix: exception could be thrown in serial iohandlers
Dieser Commit ist enthalten in:
Ursprung
ff7e2971fc
Commit
65807f3ee7
@ -39,7 +39,11 @@ SerialIOHandler::SerialIOHandler(Kernel& kernel, const std::string& device, uint
|
||||
SerialIOHandler::~SerialIOHandler()
|
||||
{
|
||||
if(m_serialPort.is_open())
|
||||
m_serialPort.close();
|
||||
{
|
||||
boost::system::error_code ec;
|
||||
m_serialPort.close(ec);
|
||||
// ignore the error
|
||||
}
|
||||
}
|
||||
|
||||
void SerialIOHandler::start()
|
||||
|
||||
@ -41,7 +41,11 @@ SerialIOHandler::SerialIOHandler(Kernel& kernel, const std::string& device, uint
|
||||
SerialIOHandler::~SerialIOHandler()
|
||||
{
|
||||
if(m_serialPort.is_open())
|
||||
m_serialPort.close();
|
||||
{
|
||||
boost::system::error_code ec;
|
||||
m_serialPort.close(ec);
|
||||
// ignore the error
|
||||
}
|
||||
}
|
||||
|
||||
void SerialIOHandler::start()
|
||||
|
||||
@ -39,7 +39,11 @@ SerialIOHandler::SerialIOHandler(Kernel& kernel, const std::string& device, uint
|
||||
SerialIOHandler::~SerialIOHandler()
|
||||
{
|
||||
if(m_serialPort.is_open())
|
||||
m_serialPort.close();
|
||||
{
|
||||
boost::system::error_code ec;
|
||||
m_serialPort.close(ec);
|
||||
// ignore the error
|
||||
}
|
||||
}
|
||||
|
||||
void SerialIOHandler::start()
|
||||
|
||||
@ -39,7 +39,11 @@ SerialIOHandler::SerialIOHandler(Kernel& kernel, const std::string& device, uint
|
||||
SerialIOHandler::~SerialIOHandler()
|
||||
{
|
||||
if(m_serialPort.is_open())
|
||||
m_serialPort.close();
|
||||
{
|
||||
boost::system::error_code ec;
|
||||
m_serialPort.close(ec);
|
||||
// ignore the error
|
||||
}
|
||||
}
|
||||
|
||||
void SerialIOHandler::start()
|
||||
|
||||
Laden…
x
In neuem Issue referenzieren
Einen Benutzer sperren