itas109 / CSerialPort

CSerialPort - lightweight cross-platform serial port library for C++/C/C#/Java/Python/Node.js/Electron
https://blog.csdn.net/itas109/article/details/84282860
Other
730 stars 339 forks source link

Small bug in CSerialPortWinBase::stopThreadMonitor() #84

Closed ecochard closed 6 months ago

ecochard commented 6 months ago

in , CSerialPortWinBase::stopThreadMonitor() there is an error in the parameter handle of SetCommMask.

bool CSerialPortWinBase::stopThreadMonitor()
{
    // Finished

    SetCommMask(m_monitorThread, 0);
                 ^^^^^^^^^^^^ should not be the thread handle but the port handle

   ....

btw: nice work thx for sharing

itas109 commented 6 months ago

Thanks for your suggestion