From a49b1d145e9c496331ac3c37bfbacb169599ddc0 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 10 Sep 2008 11:41:33 +0200 Subject: client: moved CLOSE/KILL check after client_process_line() Don't update client data if it is going to be closed anyway. --- src/client.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/client.c b/src/client.c index f0603b3bb..8c44f4308 100644 --- a/src/client.c +++ b/src/client.c @@ -419,6 +419,9 @@ static int client_input_received(struct client *client, int bytesRead) *(buf_tail - 1) = '\0'; } ret = client_process_line(client); + if (ret == COMMAND_RETURN_KILL || + ret == COMMAND_RETURN_CLOSE) + return ret; if (client_is_expired(client)) return ret; client->bufferPos = client->bufferLength; @@ -442,10 +445,6 @@ static int client_input_received(struct client *client, int bytesRead) client->bufferLength); client->bufferPos = 0; } - if (ret == COMMAND_RETURN_KILL || ret == COMMAND_RETURN_CLOSE) { - return ret; - } - } return ret; -- cgit v1.2.3