pymodbus-dev / pymodbus

A full modbus protocol written in python
Other
2.16k stars 889 forks source link

Fix condition to eliminate TID overflow issue #2174

Closed martyy665 closed 2 months ago

martyy665 commented 2 months ago

Fix tid overflow issue when tid is zero.

These two snippets are NOT the same - the difference appears when the numeric variable reaches zero (i.e. overflows):

if not tid :
    ...
if tid is None :
    ....

Reference:

2173

janiversen commented 2 months ago

Thanks.