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(client-presence): update connectivity checks #22580

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

jason-ha
Copy link
Contributor

Checking runtime.clientId only determines if ever connected. runtime.connected reveals current state.

Checking runtime.clientId only determines if ever connected. runtime.connected reveals current state.
@github-actions github-actions bot added area: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct base: main PRs targeted against main branch labels Sep 20, 2024
@@ -178,7 +178,7 @@ export class PresenceDatastoreManagerImpl implements PresenceDatastoreManager {
forceBroadcast: boolean,
): void => {
// Check for connectivity before sending updates.
if (this.runtime.clientId === undefined) {
if (!this.runtime.connected) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we check for both? Or is the runtime.connected check sufficient?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just connected is sufficient here. Once ever connected, clientId will be defined henceforth. (Which is how we got the bug.)

@msfluid-bot
Copy link
Collaborator

@fluid-example/bundle-size-tests: +245 Bytes
Metric NameBaseline SizeCompare SizeSize Diff
aqueduct.js 460.44 KB 460.47 KB +35 Bytes
azureClient.js 559.03 KB 559.08 KB +49 Bytes
connectionState.js 680 Bytes 680 Bytes No change
containerRuntime.js 261.68 KB 261.69 KB +14 Bytes
fluidFramework.js 403.45 KB 403.47 KB +14 Bytes
loader.js 134.17 KB 134.19 KB +14 Bytes
map.js 42.43 KB 42.44 KB +7 Bytes
matrix.js 145.87 KB 145.88 KB +7 Bytes
odspClient.js 526.18 KB 526.23 KB +49 Bytes
odspDriver.js 97.8 KB 97.82 KB +21 Bytes
odspPrefetchSnapshot.js 42.76 KB 42.78 KB +14 Bytes
sharedString.js 162.84 KB 162.84 KB +7 Bytes
sharedTree.js 393.92 KB 393.92 KB +7 Bytes
Total Size 3.3 MB 3.3 MB +245 Bytes

Baseline commit: 2f7a9d0

Generated by 🚫 dangerJS against 888c50a

Copy link
Contributor

@kashms kashms left a comment

Choose a reason for hiding this comment

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

LGTM 🚢

@jason-ha jason-ha merged commit e84ac46 into microsoft:main Sep 20, 2024
34 checks passed
@jason-ha jason-ha deleted the presence/fix-connectivity-checks branch September 20, 2024 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct base: main PRs targeted against main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants