Fix for crashing when sending to USB interface #451
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have a Gira USB interface, and are running knxd on a Raspberry Pi3.
Later versions of knxd have usually crashed within a few seconds after sending a packet to the USB interface, hence have not been usable for me at all.
I looked at #415 and #450, which suggested increasing send-timeout to 5000, but that did not fix the problem for me.
When I got around to debugging the issue I found that the USBLowLevelDriver did not use the configured value, but used a hard-coded value of 1000.
Changing this to using the timeout value from the config seems to work for me, at least knxd have run without any hiccups for a couple of days now.
Note that I have only tried using a configured send-timeout of 5000.