diff --git a/binding.gyp b/binding.gyp index cdb78e0a..d89faaea 100644 --- a/binding.gyp +++ b/binding.gyp @@ -5,8 +5,27 @@ 'sources': [ 'src/binding.cc' ], - 'include_dirs': ['(w->data); connection->HandleIOEvent(revents); } @@ -294,7 +301,7 @@ protected: return rv; } - int Cancel() + bool Cancel() { PGcancel* pgCancel = PQgetCancel(connection_); char errbuf[256]; @@ -379,13 +386,9 @@ protected: Emit("notice", ¬ice); } - //called to process io_events from libev + //called to process io_events from libuv void HandleIOEvent(int revents) { - if(revents & EV_ERROR) { - LOG("Connection error."); - return; - } if(connecting_) { TRACE("Processing connecting_ io"); @@ -393,8 +396,8 @@ protected: return; } - if(revents & EV_READ) { - TRACE("revents & EV_READ"); + if(revents & UV_READABLE) { + TRACE("revents & UV_READABLE"); if(PQconsumeInput(connection_) == 0) { End(); EmitLastError(); @@ -402,7 +405,7 @@ protected: return; } - //declare handlescope as this method is entered via a libev callback + //declare handlescope as this method is entered via a libuv callback //and not part of the public v8 interface HandleScope scope; @@ -432,8 +435,8 @@ protected: } - if(revents & EV_WRITE) { - TRACE("revents & EV_WRITE"); + if(revents & UV_WRITABLE) { + TRACE("revents & UV_WRITABLE"); if (PQflush(connection_) == 0) { StopWrite(); }