summaryrefslogtreecommitdiff
path: root/libpqpp/pq-connection.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-12-24 04:01:09 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2015-12-24 04:01:09 +0000
commitbb9cf4ffac0116e7cc117a5c2916367544bc3aaf (patch)
treee64cee66b6dfa8469ab7dcd3e0413f3c1ed8eabb /libpqpp/pq-connection.cpp
parentPostgreSQL files prefixed with pq- (diff)
downloadlibdbpp-postgresql-bb9cf4ffac0116e7cc117a5c2916367544bc3aaf.tar.bz2
libdbpp-postgresql-bb9cf4ffac0116e7cc117a5c2916367544bc3aaf.tar.xz
libdbpp-postgresql-bb9cf4ffac0116e7cc117a5c2916367544bc3aaf.zip
Remove 1ms sleep from ping, do the sleep in the test
Diffstat (limited to 'libpqpp/pq-connection.cpp')
-rw-r--r--libpqpp/pq-connection.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpqpp/pq-connection.cpp b/libpqpp/pq-connection.cpp
index db46dc5..74fce9e 100644
--- a/libpqpp/pq-connection.cpp
+++ b/libpqpp/pq-connection.cpp
@@ -110,7 +110,7 @@ void
PQ::Connection::ping() const
{
struct pollfd fd { PQsocket(conn), POLLRDHUP | POLLERR | POLLHUP | POLLNVAL, 0 };
- if (PQstatus(conn) != CONNECTION_OK || poll(&fd, 1, 1)) {
+ if (PQstatus(conn) != CONNECTION_OK || poll(&fd, 1, 0)) {
if (inTx()) {
throw ConnectionError(conn);
}