File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -167,9 +167,10 @@ typedef struct connectionBaton
167
167
unsigned int maxRows;
168
168
unsigned int outFormat;
169
169
Persistent<Function> cb;
170
- dpi::Env* dpienv;
171
- dpi::Conn* dpiconn;
170
+ dpi::Env* dpienv;
171
+ dpi::Conn* dpiconn;
172
172
dpi::SPool* dpipool;
173
+ bool * isPoolValid;
173
174
174
175
Oracledb *oracledb;
175
176
Original file line number Diff line number Diff line change @@ -569,8 +569,8 @@ Handle<Value> Pool::Terminate(const Arguments& args )
569
569
terminateBaton->error = NJSMessages::getErrorMsg ( errInvalidPool );
570
570
goto exitTerminate;
571
571
}
572
- terminateBaton->dpipool = njsPool->dpipool_ ;
573
- njsPool-> isValid_ = false ;
572
+ terminateBaton->dpipool = njsPool->dpipool_ ;
573
+ terminateBaton-> isPoolValid = &(njsPool-> isValid_ ) ;
574
574
575
575
exitTerminate:
576
576
terminateBaton->req .data = (void *)terminateBaton;
@@ -627,9 +627,14 @@ void Pool::Async_AfterTerminate(uv_work_t *req)
627
627
Handle<Value> argv[1 ];
628
628
629
629
if (!(terminateBaton->error ).empty ())
630
+ {
630
631
argv[0 ] = v8::Exception::Error (String::New ((terminateBaton->error ).c_str ()));
632
+ }
631
633
else
634
+ {
632
635
argv[0 ] = Undefined ();
636
+ *(terminateBaton->isPoolValid ) = false ;
637
+ }
633
638
634
639
node::MakeCallback ( Context::GetCurrent ()->Global (),
635
640
terminateBaton->cb , 1 , argv );
You can’t perform that action at this time.
0 commit comments