From e0313aeffd35807186331d04409e1e7ea5bcc7c0 Mon Sep 17 00:00:00 2001 From: wink Date: Thu, 1 Mar 2012 15:13:47 -0600 Subject: [PATCH] if PQconsumeInput returns 0, something broke, throw an error! --- src/binding.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/binding.cc b/src/binding.cc index 8518c561..f3871f23 100644 --- a/src/binding.cc +++ b/src/binding.cc @@ -384,6 +384,8 @@ protected: if(revents & EV_READ) { TRACE("revents & EV_READ"); if(PQconsumeInput(connection_) == 0) { + End(); + EmitLastError(); LOG("Something happened, consume input is 0"); return; }