This repository was archived by the owner on Jan 14, 2021. It is now read-only.
Open
Conversation
Removing event listeners on the resolver can result in recursive calls to BrowseService.Dispose(), caused by signals being dispatched inside `resolver.Failure -= OnResolveFailure', rendering the atomicity guaranteed by the lock (this) block ineffective. This commit fortifies BrowseService and ServiceBrowser from this: - BrowseService.Dispose() will not call DisposeResolver() when already disposed. - BrowseService.DisposeResolver() will nullify this.resolver before performing cleanup on the resolver. - ServiceBrowser.OnItemNew() will replace the service entry in its services dictionary with the new service before disposing of the old one. - ServiceBrowser.OnItemRemoved() will remove the service entry from its services dictionary before running Dispose() on it, thus preventing recursive Dispose() calls.
Dispose methods of IDisposable objects are should be able to be called more than once, so avoid doing anything after the first time.
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This branch fixes a crasher in Banshee when a DAAP service disappears on Ubuntu, as shown on https://bugzilla.gnome.org/show_bug.cgi?id=662309.