You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I face the race condition when I attempted to add new handler with handler level middleware while other process called RunHandlers. Router has a lock for handlers, but not for middlewares.
I face the race condition when I attempted to add new handler with handler level middleware while other process called RunHandlers. Router has a lock for handlers, but not for middlewares.
Here is a sample of a race warning I got:
`WARNING: DATA RACE
Write at 0x00c00060e008 by goroutine 1681:
github.com/ThreeDotsLabs/watermill/message.(*Router).addHandlerLevelMiddleware()
.../github.com/ThreeDotsLabs/watermill/message/router.go:194 +0x3ad
github.com/ThreeDotsLabs/watermill/message.(*Handler).AddMiddleware()
.../github.com/ThreeDotsLabs/watermill/message/router.go:651 +0x22d
Previous read at 0x00c00060e008 by goroutine 1777:
github.com/ThreeDotsLabs/watermill/message.(*Router).RunHandlers.func1()
..../github.com/ThreeDotsLabs/watermill/message/router.go:438 +0xa4`
The text was updated successfully, but these errors were encountered: