Skip to content

Commit 69f15c2

Browse files
Copilotintel352
andauthored
fix: correct stream status on stop failure and ensure clean subscribe/goroutine ordering (#14)
* Initial plan * fix: set streamErrored status in Stop() when stream.Stop() fails Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
1 parent d59f3d1 commit 69f15c2

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

internal/stream_module.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ func (m *streamModule) Stop(ctx context.Context) error {
109109

110110
if m.stream != nil {
111111
if err := m.stream.Stop(ctx); err != nil {
112+
m.setStatus(streamErrored)
112113
slog.Error("error stopping bento stream", "error", err, "module", m.name)
113114
return fmt.Errorf("bento.stream %q: stop: %w", m.name, err)
114115
}

0 commit comments

Comments
 (0)