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

fix(abort-controller): Fix abort signal handling #37

Merged
merged 2 commits into from
May 16, 2024

Conversation

JumpLink
Copy link
Collaborator

@JumpLink JumpLink commented May 14, 2024

The problem was that the AbortController did not always trigger correctly or was not used correctly in all places. This meant that not all event listeners were always logged off, which resulted in messages being registered for callout responses that were no longer active. As a result, several responses were returned, for example, those of the callout currently being actively answered but also those of the previous callout. So this had nothing to do with multiple simultaneous chats, as I had initially assumed.

Changes

  • The handling of the abort signal was not complete, this should now be fixed
  • Setting a new state now always cancels the previous process using the abort signal

@JumpLink JumpLink requested a review from wpf500 May 15, 2024 13:39
@JumpLink
Copy link
Collaborator Author

@wpf500 This is the first time that I use the AbortController, so I would like to do a review because I don't know what good patterns look like here, this is actually a DOM standard, but Deno has implemented many of them, including the AbortController.

@JumpLink JumpLink merged commit d863996 into main May 16, 2024
1 check passed
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.

1 participant