Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed issue where errorHandler in BsonInputFormatter is invoked multitple times #213

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pluma9
Copy link

@pluma9 pluma9 commented Dec 19, 2020

CreateJsonSerializer() may return a serializer that was previously returned to the pool. This means this serializer's Error event already have a subscriber. If we try to add more subscribers (jsonSerializer.Error += errorHandler;), the errorHandler will be invoked multiple times when the serializer fail to Deserialize. Therefore, we need to remove the subscriber before returning the serializer to the pool.

Copy link
Member

@filipw filipw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks

@pluma9 pluma9 changed the title Fixed issue where errorHandler in BsonInputFormatter is voked multitple times Fixed issue where errorHandler in BsonInputFormatter is invoked multitple times Dec 20, 2020
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.

None yet

2 participants