Skip to content

Commit

Permalink
Merge pull request #11693 from Uzlopak/main
Browse files Browse the repository at this point in the history
fix jsdoc for mongoose.createConnection
  • Loading branch information
AbdelrahmanHafez committed Apr 20, 2022
2 parents 89a2384 + 8a34135 commit b535375
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ Mongoose.prototype.get = Mongoose.prototype.set;
* @param {Number} [options.connectTimeoutMS=30000] How long the MongoDB driver will wait before killing a socket due to inactivity _during initial connection_. Defaults to 30000. This option is passed transparently to [Node.js' `socket#setTimeout()` function](https://nodejs.org/api/net.html#net_socket_settimeout_timeout_callback).
* @param {Number} [options.socketTimeoutMS=30000] How long the MongoDB driver will wait before killing a socket due to inactivity _after initial connection_. A socket may be inactive because of either no activity or a long-running operation. This is set to `30000` by default, you should set this to 2-3x your longest running operation if you expect some of your database operations to run longer than 20 seconds. This option is passed to [Node.js `socket#setTimeout()` function](https://nodejs.org/api/net.html#net_socket_settimeout_timeout_callback) after the MongoDB driver successfully completes.
* @param {Number} [options.family=0] Passed transparently to [Node.js' `dns.lookup()`](https://nodejs.org/api/dns.html#dns_dns_lookup_hostname_options_callback) function. May be either `0`, `4`, or `6`. `4` means use IPv4 only, `6` means use IPv6 only, `0` means try both.
* @return {Connection} the created Connection object. Connections are thenable, so you can do `await mongoose.createConnection()`
* @return {Connection} the created Connection object. Connections are not thenable, so you can not `await mongoose.createConnection()`. To await use mongoose.createConnection(uri).asPromise() instead.
* @api public
*/

Expand Down

0 comments on commit b535375

Please sign in to comment.