projects
/
pgbouncer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5eb41f7
)
asynctest: print first startup errors
author
Marko Kreen
<markokr@gmail.com>
Wed, 5 Mar 2008 09:06:55 +0000
(09:06 +0000)
committer
Marko Kreen
<markokr@gmail.com>
Wed, 5 Mar 2008 09:06:55 +0000
(09:06 +0000)
test/asynctest.c
patch
|
blob
|
blame
|
history
diff --git
a/test/asynctest.c
b/test/asynctest.c
index 21fc1adc1c2172a708d5b4dd19f68ecb3ba46629..4217ce975fb18a15f232d75c86bc352f8d0f4f63 100644
(file)
--- 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);