Skip to content

Commit 69709e2

Browse files
authored
fix: expose and use statemachine stop (#371)
1 parent 07dde62 commit 69709e2

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

channels/channels.go

+5
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,11 @@ func (c *Channels) Start(ctx context.Context) error {
8989
return c.migrateStateMachines(ctx)
9090
}
9191

92+
// Stop stops the channel statemachine
93+
func (c *Channels) Stop(ctx context.Context) error {
94+
return c.stateMachines.Stop(ctx)
95+
}
96+
9297
func (c *Channels) dispatch(eventName fsm.EventName, channel fsm.StateType) {
9398
evtCode, ok := eventName.(datatransfer.EventCode)
9499
if !ok {

impl/impl.go

+1
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ func (m *manager) Stop(ctx context.Context) error {
165165
m.spansIndex.EndAll()
166166
m.transportOptions.ClearAll()
167167
m.channelSubscriptions.Stop()
168+
m.channels.Stop(ctx)
168169
return m.transport.Shutdown(ctx)
169170
}
170171

0 commit comments

Comments
 (0)