From: Marko Kreen Date: Wed, 5 Mar 2008 09:06:55 +0000 (+0000) Subject: asynctest: print first startup errors X-Git-Tag: pgbouncer_1_2_rc2~26 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5482e20e5cbc4aca6fbf9ea3ecf674f5296701f2;p=pgbouncer asynctest: print first startup errors --- diff --git a/test/asynctest.c b/test/asynctest.c index 21fc1ad..4217ce9 100644 --- a/test/asynctest.c +++ b/test/asynctest.c @@ -182,8 +182,10 @@ static void disconnect(DbConn *db, bool is_err, const char *reason, ...) /* some error happened */ static void conn_error(DbConn *db, const char *desc) { + static int ecount = 0; if (db->con) { - /* fixme show firt couple errors */ + if (ecount++ < 3) + printf("\r%s\n", PQerrorMessage(db->con)); disconnect(db, true, "%s: %s", desc, PQerrorMessage(db->con)); } else { printf("random error: %s\n", desc);