client: moved CLOSE/KILL check after client_process_line()

Don't update client data if it is going to be closed anyway.
This commit is contained in:
Max Kellermann 2008-09-10 11:41:33 +02:00
parent be9212ba84
commit a49b1d145e

View File

@ -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;