1- // Copyright (c) 2015, 2022 , Oracle and/or its affiliates.
1+ // Copyright (c) 2015, 2023 , Oracle and/or its affiliates.
22
33//-----------------------------------------------------------------------------
44//
@@ -108,17 +108,11 @@ const njsClassDef njsClassDefPool = {
108108//-----------------------------------------------------------------------------
109109// njsPool_close()
110110// Close the pool.
111- //
112- // PARAMETERS
113- // - options
114111//-----------------------------------------------------------------------------
115- NJS_NAPI_METHOD_IMPL_ASYNC (njsPool_close , 1 , NULL )
112+ NJS_NAPI_METHOD_IMPL_ASYNC (njsPool_close , 0 , NULL )
116113{
117114 njsPool * pool = (njsPool * ) baton -> callingInstance ;
118115
119- if (!njsUtils_getNamedPropertyBool (env , args [0 ], "forceClose" ,
120- & baton -> force ))
121- return false;
122116 baton -> accessTokenCallback = pool -> accessTokenCallback ;
123117 pool -> accessTokenCallback = NULL ;
124118 baton -> dpiPoolHandle = pool -> handle ;
@@ -134,16 +128,14 @@ NJS_NAPI_METHOD_IMPL_ASYNC(njsPool_close, 1, NULL)
134128//-----------------------------------------------------------------------------
135129static bool njsPool_closeAsync (njsBaton * baton )
136130{
137- dpiPoolCloseMode mode = (baton -> force ) ? DPI_MODE_POOL_CLOSE_FORCE :
138- DPI_MODE_POOL_CLOSE_DEFAULT ;
139131 njsPool * pool = (njsPool * ) baton -> callingInstance ;
140132
141133 pool -> accessTokenCallback = baton -> accessTokenCallback ;
142134 if (baton -> accessTokenCallback ) {
143135 njsTokenCallback_stopNotifications (baton -> accessTokenCallback );
144136 baton -> accessTokenCallback = NULL ;
145137 }
146- if (dpiPool_close (baton -> dpiPoolHandle , mode ) < 0 ) {
138+ if (dpiPool_close (baton -> dpiPoolHandle , DPI_MODE_POOL_CLOSE_FORCE ) < 0 ) {
147139 njsBaton_setErrorDPI (baton );
148140 pool -> handle = baton -> dpiPoolHandle ;
149141 baton -> dpiPoolHandle = NULL ;
0 commit comments