Skip to content

Commit

Permalink
Added keepAlive and pooling settings to Adaptive Runtime (UHG)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tracy Boehrer committed Dec 14, 2023
1 parent 89d7237 commit c68ba42
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions libraries/botbuilder-dialogs-adaptive-runtime/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

import http from 'http';
import https from 'https';

import * as z from 'zod';
import fs from 'fs';
import path from 'path';
import { Configuration } from './configuration';

import LuisBotComponent from 'botbuilder-ai-luis';
import QnAMakerBotComponent from 'botbuilder-ai-qna';
import { AdaptiveBotComponent, LanguageGenerationBotComponent } from 'botbuilder-dialogs-adaptive';
Expand Down Expand Up @@ -585,7 +587,22 @@ export async function getRuntimeServices(

const services = new ServiceCollection({
botFrameworkClientFetch: undefined,
connectorClientOptions: undefined,
connectorClientOptions: {
agentSettings: {
http: new http.Agent({
keepAlive: true,
maxSockets: 128,
maxFreeSockets: 32,
timeout: 60000,
}),
https: new https.Agent({
keepAlive: true,
maxSockets: 128,
maxFreeSockets: 32,
timeout: 60000,
}),
},
},
customAdapters: new Map(),
declarativeTypes: [],
memoryScopes: [],
Expand Down

0 comments on commit c68ba42

Please sign in to comment.