diff --git a/src/cmap/connection.ts b/src/cmap/connection.ts index 464f86d9b39..ad493566208 100644 --- a/src/cmap/connection.ts +++ b/src/cmap/connection.ts @@ -122,7 +122,9 @@ export interface ConnectionOptions credentials?: MongoCredentials; connectTimeoutMS?: number; tls: boolean; + /** @deprecated - Will not be able to turn off in the future. */ keepAlive?: boolean; + /** @deprecated - Will not be configurable in the future. */ keepAliveInitialDelay?: number; noDelay?: boolean; socketTimeoutMS?: number; diff --git a/src/connection_string.ts b/src/connection_string.ts index 9b554372739..852120014e0 100644 --- a/src/connection_string.ts +++ b/src/connection_string.ts @@ -866,11 +866,13 @@ export const OPTIONS = { }, keepAlive: { default: true, - type: 'boolean' + type: 'boolean', + deprecated: 'Will not be able to turn off in the future.' }, keepAliveInitialDelay: { default: 120000, - type: 'uint' + type: 'uint', + deprecated: 'Will not be configurable in the future.' }, loadBalanced: { default: false, diff --git a/src/mongo_client.ts b/src/mongo_client.ts index 885c980fbf9..562a41c36ff 100644 --- a/src/mongo_client.ts +++ b/src/mongo_client.ts @@ -211,9 +211,12 @@ export interface MongoClientOptions extends BSONSerializeOptions, SupportedNodeC sslCRL?: string; /** TCP Connection no delay */ noDelay?: boolean; - /** TCP Connection keep alive enabled */ + /** @deprecated TCP Connection keep alive enabled. Will not be able to turn off in the future. */ keepAlive?: boolean; - /** The number of milliseconds to wait before initiating keepAlive on the TCP socket */ + /** + * @deprecated The number of milliseconds to wait before initiating keepAlive on the TCP socket. + * Will not be configurable in the future. + */ keepAliveInitialDelay?: number; /** Force server to assign `_id` values instead of driver */ forceServerObjectId?: boolean;