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 taskCompletionSourceVariable that gets 'nulled' when a task is co… #24

Conversation

thanoskapsalis
Copy link

Issue Summary:
An issue was identified in the dialog component, specifically when the same dialog is presented consecutively. The problem was that the task waiting for the result of the second dialog instance was being set to null, causing the response to never return.

Root Cause:
The root cause of the issue was the premature nullification of taskCompletionSource. When a task was completed, taskCompletionSource was set to null. If the dialog was shown again immediately, a new task was created, but the taskCompletionSource for this new task was also set to null, resulting in the loss of the task's result.

Solution:
To resolve this issue, the code that set taskCompletionSource to null upon task completion was removed. This change ensures that each new task is properly managed and retains its state until the dialog interaction completes. Additionally, the module is designed to handle past tasks by canceling them and relying on the garbage collector for disposal, ensuring that there are no lingering issues with task management.

…mpleted and a new one started imidietly. The issue occures in rare cases when the same dialogue used continously on same action and the tasklist is constantly refreshed without having room to dispose the object
@stavroskasidis stavroskasidis merged commit 93facdb into stavroskasidis:develop Jul 17, 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.

2 participants