Skip to content

Conversation

@wwaaijer
Copy link

Fixes stoprocent/noble#30 and stoprocent/bleno#11.

This adds a read timeout to the HCI Linux socket using SO_RCVTIMEO (see socket(7)), allowing the poll thread to check the stop flag even when there is no activity on the socket.

Alternatives considered:

  • Immediate socket close - couldn't guarantee pending commands reach the HCI device
  • Explicit wait for specific response events - would require significant additional code in both Bleno's and Noble's clean up process

Happy to discuss or elaborate!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Noble.stop() sometime hangs

1 participant