File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ var pluginDependencies = require('./pluginDependencies.js'),
1111 apiCountlyConfig = require ( '../api/config' , 'dont-enclose' ) ,
1212 utils = require ( '../api/utils/utils.js' ) ,
1313 fs = require ( 'fs' ) ,
14- url = require ( 'url' ) ,
1514 querystring = require ( 'querystring' ) ,
1615 cp = require ( 'child_process' ) ,
1716 async = require ( "async" ) ,
@@ -1877,9 +1876,12 @@ var pluginManager = function pluginManager() {
18771876 }
18781877
18791878 if ( config && typeof config . mongodb === "string" ) {
1880- var urlParts = url . parse ( config . mongodb , true ) ;
1881- if ( urlParts && urlParts . query && urlParts . query . maxPoolSize ) {
1882- maxPoolSize = urlParts . query . maxPoolSize ;
1879+ const urlParts = config . mongodb . split ( '?' ) ;
1880+
1881+ if ( urlParts . length > 1 ) {
1882+ const queryParams = new URLSearchParams ( urlParts [ 1 ] ) ;
1883+
1884+ maxPoolSize = queryParams . get ( 'maxPoolSize' ) || maxPoolSize ;
18831885 }
18841886 }
18851887 else {
You can’t perform that action at this time.
0 commit comments