Skip to content

Commit 863a1ba

Browse files
committed
inline AbortConnection
1 parent af8ebe5 commit 863a1ba

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/binding.cc

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ class Connection : public EventEmitter {
105105
String::Utf8Value conninfo(args[0]->ToString());
106106
bool success = self->Connect(*conninfo);
107107
if(!success) {
108-
self -> AbortConnection();
108+
self -> EmitLastError();
109+
self -> DestroyConnection();
109110
}
110111

111112
return Undefined();
@@ -282,13 +283,6 @@ class Connection : public EventEmitter {
282283
}
283284
}
284285

285-
//aborts connection and returns connection error message
286-
void AbortConnection()
287-
{
288-
EmitLastError();
289-
DestroyConnection();
290-
}
291-
292286
//safely destroys the connection at most 1 time
293287
void DestroyConnection()
294288
{

0 commit comments

Comments
 (0)