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
740 stars 338 forks source link

Small bug in CSerialPortWinBase::stopThreadMonitor() #84

Closed ecochard closed 7 months ago

ecochard commented 7 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 7 months ago

Thanks for your suggestion