From fa48c87cb6092b68be1e6efb6c9fc1ef7b780589 Mon Sep 17 00:00:00 2001 From: Marko Kreen Date: Fri, 18 Jan 2008 06:59:55 +0000 Subject: [PATCH] remove unnecessary warning --- src/client.c | 6 ++---- src/server.c | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) 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: -- 2.40.0