From 863a1ba85c04c99cf241293fac6aa1089068cfdb Mon Sep 17 00:00:00 2001 From: Brian Carlson Date: Thu, 14 Apr 2011 22:42:35 -0500 Subject: [PATCH] inline AbortConnection --- src/binding.cc | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/binding.cc b/src/binding.cc index ef5af0f..3a008aa 100644 --- a/src/binding.cc +++ b/src/binding.cc @@ -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() {