Skip to content

Commit e564b43

Browse files
fix: consumer close before run
1 parent 325b049 commit e564b43

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

consume.go

+2
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ func (consumer *Consumer) startGoroutines(
131131
handler Handler,
132132
options ConsumerOptions,
133133
) error {
134+
consumer.isClosedMux.Lock()
135+
defer consumer.isClosedMux.Unlock()
134136
err := consumer.chanManager.QosSafe(
135137
options.QOSPrefetch,
136138
0,

0 commit comments

Comments
 (0)