-
Notifications
You must be signed in to change notification settings - Fork 717
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIXED]
Drain()
infinite loop and add test for concurrent Next()
…
…calls (#1525) * Added failing graceful shutdown test for MessagesContext.Drain method * Minimize lock scope in pullSubscription.Next to allow for cleanup Fixes possible deadlock when Next() is waiting and holding the lock and cleanup() waiting for the lock to unsubscribe. * Remove unused drained channel from pullSubscription * Added test for auto unsubscribe with concurrent calls * Revert locking in Next and remove cleanup lock * Prevent hanging in the auto-unsubscribe test Added comment for the cleanup function on why it doesn't need to hold the lock.
- Loading branch information
Showing
2 changed files
with
171 additions
and
61 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