Closed sappo closed 8 years ago
Hi @sappo, the intention of this function is to wait only one timeout period for a reply. The timeout counter is only for those cases with a partial reply. If i would apply your pull request a scan would take a huge amout of time. In order avoid confusion we will add a comment about timeout handling.
@lategoodbye thanks for clarifying.
Solution: Additionally check if len==0.
If the first read() of the loop returns with 0 the timeouts counter is incremented but on the same time mbus_parse() will return with remaining <= 0. Thus the 3 retires that the timeouts counters should guarantee are skip all together.