Skip to content

Commit

Permalink
allow connect() if this.connected is true
Browse files Browse the repository at this point in the history
  • Loading branch information
scottn12 authored May 9, 2022
1 parent ee32abd commit ae2e469
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/loader/container-loader/src/container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ export class Container extends EventEmitterWithErrorHandling<IContainerEvents> i
else if (this._attachState !== AttachState.Attached) {
throw new UsageError(`The Container is not attached and cannot be connected`);
}
else if (!this.connected) {
else {
// Note: no need to fetch ops as we do it preemptively as part of DeltaManager.attachOpHandler().
// If there is gap, we will learn about it once connected, but the gap should be small (if any),
// assuming that connect() is called quickly after initial container boot.
Expand Down
1 change: 1 addition & 0 deletions packages/test/test-utils/src/loaderContainerTracker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ export class LoaderContainerTracker implements IOpProcessingController {
/**
* Make sure all the tracked containers are synchronized.
* - No isDirty (non-readonly) containers
* - No disconnected containers (connectionState === ConnectionState.Disconnected)
* - No extra clientId in quorum of any container that is not tracked and still opened.
* - i.e. no pending Join/Leave message.
* - No unresolved proposal (minSeqNum \>= lastProposalSeqNum)
Expand Down

0 comments on commit ae2e469

Please sign in to comment.