Go to the profile of  Leo
Leo
why do i need a bio? they are painful to write.
1 min read

How to setup client timeout for Azure Bot Framework Webchat

window.WebChat.renderWebChat(
          {
            sendTimeout: 30000, <===== TIMEOUT
            userID: '12345',
            store,
            directLine: window.WebChat.createDirectLine({
              domain: 'https://directline.rancher/directline',
              // domain: 'http://localhost:3000/directline',
              token: 'token'
            })
          },
          document.getElementById('webchat')
        );

Note: The sendTimeout property is not propagate down to DirectLine which has a hard coded value of 20 seconds.

https://github.com/microsoft/BotFramework-DirectLineJS/blob/6ffe60a09a5a6311a55f5feaa783b23362f04a63/src/directLine.ts#L367

The current code as of this writing doesn't do anything with the sendTimeout when initializing DirectLine

https://github.com/microsoft/BotFramework-WebChat/blob/master/packages/bundle/src/createDirectLine.js#L23

I've opened an issue suggesting to allow developers to set timeout for DirectLine too.

https://github.com/microsoft/BotFramework-WebChat/issues/2594