We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af8ebe5 commit 863a1baCopy full SHA for 863a1ba
src/binding.cc
@@ -105,7 +105,8 @@ class Connection : public EventEmitter {
105
String::Utf8Value conninfo(args[0]->ToString());
106
bool success = self->Connect(*conninfo);
107
if(!success) {
108
- self -> AbortConnection();
+ self -> EmitLastError();
109
+ self -> DestroyConnection();
110
}
111
112
return Undefined();
@@ -282,13 +283,6 @@ class Connection : public EventEmitter {
282
283
284
285
- //aborts connection and returns connection error message
286
- void AbortConnection()
287
- {
288
- EmitLastError();
289
- DestroyConnection();
290
- }
291
-
292
//safely destroys the connection at most 1 time
293
void DestroyConnection()
294
{
0 commit comments