-
Notifications
You must be signed in to change notification settings - Fork 30.6k
[FIX] iot_base: event listener requests not cancelling #234872
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
Closed
MaxTheWhale
wants to merge
1
commit into
odoo:saas-18.3
from
odoo-dev:saas-18.3-iot_base-longpolling-abort-mawh
Closed
[FIX] iot_base: event listener requests not cancelling #234872
MaxTheWhale
wants to merge
1
commit into
odoo:saas-18.3
from
odoo-dev:saas-18.3-iot_base-longpolling-abort-mawh
Conversation
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
Contributor
08214df to
ca47e6e
Compare
loouis-t
reviewed
Nov 7, 2025
loouis-t
approved these changes
Nov 7, 2025
Contributor
loouis-t
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
robodoo delegate+
ca47e6e to
f485b97
Compare
Contributor
Author
|
@robodoo r+ |
Contributor
Author
|
@robodoo up to 19.0 |
Contributor
|
Forward-porting to '19.0'. |
f485b97 to
c3a48d0
Compare
Contributor
Author
|
@robodoo r+ |
Steps to reproduce: 1. Pair an IoT box 2. In the IoT form view, click on any device, then click back to return to the IoT form view. 3. Repeat this step multiple times. If you have devtools open, you can see a `/event` fetch request every time you open the device form. Expected behaviour: - When a new request is made, the previous request is cancelled. Actual behaviour: - The previous requests remain active, and eventually no further requests are possible due to browser limits. This behaviour was broken when the longpolling was changed to use the `fetch` method instead of Odoo's `rpc` method. This commit restores the behaviour by using an `AbortController` instance which is aborted when `stopPolling` is called.
c3a48d0 to
3895da1
Compare
Contributor
Author
|
@robodoo r+ |
robodoo
pushed a commit
that referenced
this pull request
Nov 7, 2025
Steps to reproduce: 1. Pair an IoT box 2. In the IoT form view, click on any device, then click back to return to the IoT form view. 3. Repeat this step multiple times. If you have devtools open, you can see a `/event` fetch request every time you open the device form. Expected behaviour: - When a new request is made, the previous request is cancelled. Actual behaviour: - The previous requests remain active, and eventually no further requests are possible due to browser limits. This behaviour was broken when the longpolling was changed to use the `fetch` method instead of Odoo's `rpc` method. This commit restores the behaviour by using an `AbortController` instance which is aborted when `stopPolling` is called. closes #234872 Signed-off-by: Max Whale (mawh) <mawh@odoo.com>
This was referenced Nov 7, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Steps to reproduce:
/eventfetch request every time you open the device form.Expected behaviour:
Actual behaviour:
This behaviour was broken when the longpolling was changed to use the
fetchmethod instead of Odoo'srpcmethod. This commit restores the behaviour by using anAbortControllerinstance which is aborted whenstopPollingis called.Manual Forward Port of Enterprise PR: https://github.com/odoo/enterprise/pull/98985
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr