chore: misc prerelease fixes
Some checks failed
Release Please / release-please (push) Waiting to run
Build Snapshot Release / build (push) Has been cancelled
Test / test-nix (push) Has been cancelled
Test / test-win (push) Has been cancelled

This commit is contained in:
Gareth George
2025-01-07 22:31:40 -08:00
parent b8acc12d6a
commit ace719f54b
8 changed files with 60 additions and 37 deletions

View File

@@ -62,7 +62,7 @@ func NewSyncClient(mgr *SyncManager, localInstanceID string, peer *v1.Multihost_
peer.GetInstanceUrl(),
)
return &SyncClient{
c := &SyncClient{
mgr: mgr,
localInstanceID: localInstanceID,
peer: peer,
@@ -70,7 +70,9 @@ func NewSyncClient(mgr *SyncManager, localInstanceID string, peer *v1.Multihost_
client: client,
oplog: oplog,
l: zap.L().Named(fmt.Sprintf("syncclient for %q", peer.GetInstanceId())),
}, nil
}
c.setConnectionState(v1.SyncConnectionState_CONNECTION_STATE_DISCONNECTED, "starting up")
return c, nil
}
func (c *SyncClient) setConnectionState(state v1.SyncConnectionState, message string) {
@@ -116,6 +118,7 @@ func (c *SyncClient) runSyncInternal(ctx context.Context) error {
stream := c.client.Sync(ctx)
ctx, cancelWithError := context.WithCancelCause(ctx)
defer cancelWithError(nil)
receiveError := make(chan error, 1)
receive := make(chan *v1.SyncStreamItem, 1)