inline AbortConnection
This commit is contained in:
parent
af8ebe520c
commit
863a1ba85c
@ -105,7 +105,8 @@ public:
|
||||
String::Utf8Value conninfo(args[0]->ToString());
|
||||
bool success = self->Connect(*conninfo);
|
||||
if(!success) {
|
||||
self -> AbortConnection();
|
||||
self -> EmitLastError();
|
||||
self -> DestroyConnection();
|
||||
}
|
||||
|
||||
return Undefined();
|
||||
@ -282,13 +283,6 @@ protected:
|
||||
}
|
||||
}
|
||||
|
||||
//aborts connection and returns connection error message
|
||||
void AbortConnection()
|
||||
{
|
||||
EmitLastError();
|
||||
DestroyConnection();
|
||||
}
|
||||
|
||||
//safely destroys the connection at most 1 time
|
||||
void DestroyConnection()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user