-
-
Notifications
You must be signed in to change notification settings - Fork 377
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix gRPC
BoardList*
methods concurrency issues (#1804)
* Improved streaming of pluggable-discoveries events (WIP) Now the DiscoveryManager is able to start the discoveries and add/remove them in a thread-safe way. Also the watchers may connect and disconnect seamlessly at any time, the incoming events from the discovery are broadcasted correctly to each active watcher. This refactoring dramatically simplifies the DiscoveryManager design. * Added discovery id in discovery.Event struct * Cache active ports and transmit them when a new watcher connects * Correctly handle discovery cleanup * Fixed wrong test * Correctly handle discovery cleanup and re-add * Added some doc comments in the source code * Move Unlock under defer * Factored subrotuine into a function it will be useful in the next commits. * Do not cache ports in the DiscoveryClient there is already a cache in the DiscoveryManager there is no need to duplicate it. * Discovery: eventChan must be protected by mutex when doing START_SYNC otherwise the discovery may send some events before the eventChan is setup (and those events will be lost) * Increased error level for logging watchers that lags * Updated discvoery_client to the latest API * Report discovery start errors * Update arduino/discovery/discovery_client/main.go Co-authored-by: Umberto Baldi <[email protected]> Co-authored-by: Umberto Baldi <[email protected]>
- Loading branch information
Showing
10 changed files
with
289 additions
and
404 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.