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
710 stars 337 forks source link

CommThread deal with mutil handle tigger at the same time Bug #44

Closed itas109 closed 3 years ago

itas109 commented 3 years ago

Describe the bug CommThread deal with mutil handle tigger at the same time Bug

Event should begin Event - WAIT_OBJECT_0 not Event - WAIT_OBJECT_0 -1

line 641

//deal with mutil handle tigger at the same time    //by itas109 2017-12-17
if (Event >= WAIT_OBJECT_0 && Event < WAIT_OBJECT_0 + 3)
{
    for (int i = Event - WAIT_OBJECT_0 -1 ; i < 3; i++)
        ...
}

Desktop (please complete the following information):