Skip to content

Commit e0313ae

Browse files
author
wink
committed
if PQconsumeInput returns 0, something broke, throw an error!
1 parent b689136 commit e0313ae

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/binding.cc

+2
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,8 @@ class Connection : public ObjectWrap {
384384
if(revents & EV_READ) {
385385
TRACE("revents & EV_READ");
386386
if(PQconsumeInput(connection_) == 0) {
387+
End();
388+
EmitLastError();
387389
LOG("Something happened, consume input is 0");
388390
return;
389391
}

0 commit comments

Comments
 (0)