We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 125075b commit 60130a9Copy full SHA for 60130a9
src/binding.cc
@@ -329,18 +329,18 @@ class Connection : public ObjectWrap {
329
LOG("Connection couldn't be created");
330
}
331
332
- if (PQsetnonblocking(connection_, 1) == -1) {
333
- LOG("Unable to set connection to non-blocking");
334
- return false;
335
- }
336
-
337
ConnStatusType status = PQstatus(connection_);
338
339
if(CONNECTION_BAD == status) {
340
LOG("Bad connection status");
341
return false;
342
343
+ if (PQsetnonblocking(connection_, 1) == -1) {
+ LOG("Unable to set connection to non-blocking");
+ return false;
+ }
+
344
int fd = PQsocket(connection_);
345
if(fd < 0) {
346
LOG("socket fd was negative. error");
0 commit comments