Skip to content
This repository has been archived by the owner on Jan 1, 2022. It is now read-only.

BotManager in webhook mode #13

Open
tuscen opened this issue Dec 28, 2017 · 0 comments
Open

BotManager in webhook mode #13

tuscen opened this issue Dec 28, 2017 · 0 comments

Comments

@tuscen
Copy link
Member

tuscen commented Dec 28, 2017

There is a problem with IBotManager<TBot> instances lifetime in webhook mode. Each middleware in ASP.NET Core is instantiated once and is kept in memory as a part of middleware pipeline. So it is essentially a singleton. But IBotManager<TBot> has scoped lifetime. IBotManager<TBot> should be injected as a parameter of Invoke method here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant