From d9fa2cab71615df423aedbba64f27061cd8c6447 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 5 Jul 2021 21:22:59 +0100 Subject: Simplify PQ end upload --- lib/output/pq/pqConn.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/output/pq/pqConn.cpp b/lib/output/pq/pqConn.cpp index f4e5226..983271e 100644 --- a/lib/output/pq/pqConn.cpp +++ b/lib/output/pq/pqConn.cpp @@ -85,11 +85,7 @@ namespace MyGrate::Output::Pq { void PqConn::endBulkUpload(const char * errormsg) { - int rc; - while (!(rc = PQputCopyEnd(this->conn.get(), errormsg))) { - sleep(1); - } - verify(rc == 1, "copy end rc", conn.get()); + verify(PQputCopyEnd(this->conn.get(), errormsg) == 1, "copy end rc", conn.get()); ResPtr res {PQgetResult(conn.get()), &PQclear}; verify(PQresultStatus(res.get()) == PGRES_COMMAND_OK, "end copy", res.get()); } -- cgit v1.2.3