ThreeDotsLabs / watermill

Building event-driven applications the easy way in Go.
https://watermill.io
MIT License
7.88k stars 410 forks source link

[watermill-googlecloud] panic: close of closed channel goroutine #351

Open henzai opened 1 year ago

henzai commented 1 year ago

hey, we got logs about panic while closing subscriber. our system runs on GKE. and it looks to raise panic in deploying on GKE.

panic: close of closed channel goroutine 2486 [running]: 
github.com/ThreeDotsLabs/watermill-googlecloud/pkg/googlecloud.(*Subscriber).Close(0xc000c5e000) 
/our_system/go/pkg/mod/github.com/!three!dots!labs/watermill-googlecloud@v1.0.13/pkg/googlecloud/subscriber.go:256 +0x77 
github.com/ThreeDotsLabs/watermill/message.(*messageTransformSubscriberDecorator).Close(0xc00355d260) 
/our_system/go/pkg/mod/github.com/!three!dots!labs/watermill@v1.2.0/message/decorator.go:64 +0x29 
github.com/ThreeDotsLabs/watermill/message.(*handler).handleClose(0xc00083fee0, {0x1f9d0f8?, 0xc003447e00?}) 
/our_system/go/pkg/mod/github.com/!three!dots!labs/watermill@v1.2.0/message/router.go:732 +0xc7 
created by github.com/ThreeDotsLabs/watermill/message.(*handler).run 
/our_system/go/pkg/mod/github.com/!three!dots!labs/watermill@v1.2.0/message/router.go:597 +0x28f

we are using these versions of watermill and watermill-googlecloud below.

github.com/ThreeDotsLabs/watermill v1.2.0
github.com/ThreeDotsLabs/watermill-googlecloud v1.0.13
jlevesy commented 2 months ago

Hey, I may have a fix for this https://github.com/ThreeDotsLabs/watermill-googlecloud/pull/34.