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:
parent
be9212ba84
commit
a49b1d145e
@ -419,6 +419,9 @@ static int client_input_received(struct client *client, int bytesRead)
|
|||||||
*(buf_tail - 1) = '\0';
|
*(buf_tail - 1) = '\0';
|
||||||
}
|
}
|
||||||
ret = client_process_line(client);
|
ret = client_process_line(client);
|
||||||
|
if (ret == COMMAND_RETURN_KILL ||
|
||||||
|
ret == COMMAND_RETURN_CLOSE)
|
||||||
|
return ret;
|
||||||
if (client_is_expired(client))
|
if (client_is_expired(client))
|
||||||
return ret;
|
return ret;
|
||||||
client->bufferPos = client->bufferLength;
|
client->bufferPos = client->bufferLength;
|
||||||
@ -442,10 +445,6 @@ static int client_input_received(struct client *client, int bytesRead)
|
|||||||
client->bufferLength);
|
client->bufferLength);
|
||||||
client->bufferPos = 0;
|
client->bufferPos = 0;
|
||||||
}
|
}
|
||||||
if (ret == COMMAND_RETURN_KILL || ret == COMMAND_RETURN_CLOSE) {
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user