diff --git a/internal/internal_event_handlers.go b/internal/internal_event_handlers.go index 881aa8fe1..174eba55c 100644 --- a/internal/internal_event_handlers.go +++ b/internal/internal_event_handlers.go @@ -354,7 +354,7 @@ func (wc *workflowEnvironmentImpl) Send(msg *protocolpb.Message, opts ...msgSend wc.outbox = append(wc.outbox, outboxEntry{msg: msg, eventPredicate: sendCfg.pred}) } -func (wc *workflowEnvironmentImpl) getNewSdkName() string { +func (wc *workflowEnvironmentImpl) getNewSdkNameAndReset() string { if wc.sdkNameUpdated { wc.sdkNameUpdated = false return wc.sdkName @@ -362,7 +362,7 @@ func (wc *workflowEnvironmentImpl) getNewSdkName() string { return "" } -func (wc *workflowEnvironmentImpl) getNewSdkVersion() string { +func (wc *workflowEnvironmentImpl) getNewSdkVersionAndReset() string { if wc.sdkVersionUpdated { wc.sdkVersionUpdated = false return wc.sdkVersion diff --git a/internal/internal_task_handlers.go b/internal/internal_task_handlers.go index 12b4c1e24..3c0b5545c 100644 --- a/internal/internal_task_handlers.go +++ b/internal/internal_task_handlers.go @@ -1772,8 +1772,8 @@ func (wth *workflowTaskHandlerImpl) completeWorkflow( MeteringMetadata: &commonpb.MeteringMetadata{NonfirstLocalActivityExecutionAttempts: nonfirstLAAttempts}, SdkMetadata: &sdk.WorkflowTaskCompletedMetadata{ LangUsedFlags: langUsedFlags, - SdkName: eventHandler.getNewSdkName(), - SdkVersion: eventHandler.getNewSdkVersion(), + SdkName: eventHandler.getNewSdkNameAndReset(), + SdkVersion: eventHandler.getNewSdkVersionAndReset(), }, WorkerVersionStamp: &commonpb.WorkerVersionStamp{ BuildId: wth.workerBuildID,