-
Notifications
You must be signed in to change notification settings - Fork 292
Description
Background
On Windows Azure Web Apps using IIS Node, the initial Node.js process when an App Service is started isn't "completely disposed" of when Direct Line ASE (the usage of a Named Pipe Connection) is being used and the App Service goes idle.
When the App Service begins processing web requests again, the index.js/app.js is run again and BotFrameworkAdapter.useNamedPipe() is called but throws an Error because the "newly created" BotFrameworkAdapter has the NamedPipeServer and Named Pipe connection of the Adapter created when the App Service first started running.
Desired behavior
BotFrameworkAdapter.useNamedPipe(logic, pipeName) should check to see if the Adapter is already connected to a stream, and if that stream is tied to the passed in pipeName, should operate in an idempotent fashion and let the application continue starting up.
If the Adapter's current Streaming Server is not tied to the designated pipeName, the application needs to create a new Adapter instance for this different desired Named Pipe connection. BotFrameworkAdapters in the JS SDK are scoped to one Streaming Server only.