From: Marko Kreen Date: Fri, 18 Jan 2008 06:59:55 +0000 (+0000) Subject: remove unnecessary warning X-Git-Tag: pgbouncer_1_2_rc2~57 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fa48c87cb6092b68be1e6efb6c9fc1ef7b780589;p=pgbouncer remove unnecessary warning --- diff --git a/src/client.c b/src/client.c index 499b412..a801680 100644 --- a/src/client.c +++ b/src/client.c @@ -344,11 +344,9 @@ bool client_proto(SBuf *sbuf, SBufEvent evtype, MBuf *data, void *arg) Assert(client->sbuf.sock); Assert(client->state != CL_FREE); - if (client->state == CL_JUSTFREE) { - /* SBuf should catch the case */ - slog_warning(client, "state=CL_JUSTFREE, should not happen"); + /* may happen if close failed */ + if (client->state == CL_JUSTFREE) return false; - } switch (evtype) { case SBUF_EV_CONNECT_OK: diff --git a/src/server.c b/src/server.c index 18bb5d7..bd6f1ee 100644 --- a/src/server.c +++ b/src/server.c @@ -304,11 +304,9 @@ bool server_proto(SBuf *sbuf, SBufEvent evtype, MBuf *data, void *arg) Assert(is_server_socket(server)); Assert(server->state != SV_FREE); - if (server->state == SV_JUSTFREE) { - /* SBuf should catch the case */ - slog_warning(server, "state=SV_JUSTFREE, should not happen"); + /* may happen if close failed */ + if (server->state == SV_JUSTFREE) return false; - } switch (evtype) { case SBUF_EV_RECV_FAILED: