Fix duplicate connection/logs in Webdev#2635
Merged
jyameo merged 12 commits intodart-lang:mainfrom Jun 20, 2025
Merged
Conversation
This reverts commit 2ccd2d9.
|
autosubmit label was removed for dart-lang/webdev/2635, because - The status or check suite publish / validate has failed. Please fix the issues identified (or deflake) before re-applying this label. |
bkonyi
reviewed
Jun 19, 2025
bkonyi
approved these changes
Jun 20, 2025
Collaborator
bkonyi
left a comment
There was a problem hiding this comment.
Just a couple minor comments, but LGTM!
Contributor
Author
|
@bkonyi I made the following changes:
Let me know what you think and If I missed something here. Thanks :) |
copybara-service Bot
pushed a commit
to dart-lang/sdk
that referenced
this pull request
Jun 23, 2025
Revisions updated by `dart tools/rev_sdk_deps.dart`. ai (https://github.com/dart-lang/ai/compare/f2b48c6..12ac0a4): 12ac0a4 2025-06-18 Jacob MacDonald make the log file test less flaky by retrying deletes and reads (dart-lang/ai#180) dbedc6d 2025-06-18 Jacob MacDonald fix cruft in description (dart-lang/ai#179) 3ab9482 2025-06-18 Jacob MacDonald improve tool description for the dtd connection tool and improve error messages (dart-lang/ai#178) 4ca0ff1 2025-06-18 Jacob MacDonald Use shared Implementation type, add clientInfo field to MCPServer (dart-lang/ai#175) 885a4c5 2025-06-18 Jacob MacDonald Add `--log-file` argument to log all protocol traffic to a file (dart-lang/ai#176) 7ca3eba 2025-06-17 Nate Bosch Add JSON schema for test runner arguments (dart-lang/ai#169) core (https://github.com/dart-lang/core/compare/dc97530..b59ecf4): b59ecf4c 2025-06-18 Lasse R.H. Nielsen Optimize surrogate decoding. (dart-lang/core#894) dartdoc (https://github.com/dart-lang/dartdoc/compare/4ceea6b..f1fe177): f1fe1775 2025-06-16 Sarah Zakarias Refactor 404 error page to use div instead of p for search form (dart-lang/dartdoc#4064) ecosystem (https://github.com/dart-lang/ecosystem/compare/64aac3a..d5233c6): d5233c6 2025-06-13 dependabot[bot] Bump the github-actions group with 5 updates (dart-lang/ecosystem#351) web (https://github.com/dart-lang/web/compare/c8c1c28..4b2f02e): 4b2f02e 2025-06-18 nikeokoronkwo Add Variable Declaration Support (dart-lang/web#382) webdev (https://github.com/dart-lang/webdev/compare/661dafd..6dc3dde): 6dc3ddef 2025-06-20 Jessy Yameogo Fix duplicate connection/logs in Webdev (dart-lang/webdev#2635) 0c8a17b4 2025-06-20 Morgan :) Remove dependency overrides. (dart-lang/webdev#2634) a3218638 2025-06-16 Jessy Yameogo modifying DWDS Injector to always inject client and introduce useDwdsWebSocketConnection flag (dart-lang/webdev#2629) 2eb27546 2025-06-16 Morgan :) Prepare for `build_runner` changes. (dart-lang/webdev#2633) Change-Id: Ib323bea37dd77ed94387e77d9c504f889bfa8050 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/436021 Auto-Submit: Devon Carew <devoncarew@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
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 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.
Fix duplicate app logs on page refresh in Webdev
Fixes: #2604
Problem
Each page refresh created duplicate stdout listeners for the same app, causing exponential log duplication (1 log → 2 logs → 3 logs, etc.).
Root Cause
app_domain.dart created new VM service stdout listeners on every dwds.connectedApps event without checking if listeners already existed for the same appId.
Solution
Added simple tracking to prevent duplicate listeners:
Changes
app_domain.dart: Added listener deduplication with minimal code changes
Result