Skip to content

Commit 83d9879

Browse files
authored
Start stream sender before register (temporalio#7505)
## What changed? Start stream sender before register ## Why? The stream monitor could invalid the stream sender before it starts and create a dangling sender. ## How did you test it? <!-- How have you verified this change? Tested locally? Added a unit test? Checked in staging env? --> ## Potential risks <!-- Assuming the worst case, what can be broken when deploying this change to production? --> ## Documentation <!-- Have you made sure this change doesn't falsify anything currently stated in `docs/`? If significant new behavior is added, have you described that in `docs/`? --> ## Is hotfix candidate? <!-- Is this PR a hotfix candidate or does it require a notification to be sent to the broader community? (Yes/No) -->
1 parent f5b41bb commit 83d9879

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

service/history/handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2141,8 +2141,8 @@ func (h *Handler) StreamWorkflowReplicationMessages(
21412141
replication.NewClusterShardKey(serverClusterShardID.ClusterID, serverClusterShardID.ShardID),
21422142
h.config,
21432143
)
2144-
h.streamReceiverMonitor.RegisterInboundStream(streamSender)
21452144
streamSender.Start()
2145+
h.streamReceiverMonitor.RegisterInboundStream(streamSender)
21462146
defer streamSender.Stop()
21472147
streamSender.Wait()
21482148
return nil

0 commit comments

Comments
 (0)