Skip to content

Commit

Permalink
dict: Avoid potentially using 100% CPU
Browse files Browse the repository at this point in the history
Continuing 65c570f fix.
  • Loading branch information
sirainen committed Jun 14, 2016
1 parent 7e55f1e commit 68df459
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/dict/dict-connection.c
Expand Up @@ -109,6 +109,9 @@ static void dict_connection_input_more(struct dict_connection *conn)
const char *line;
int ret;

if (conn->to_input != NULL)
timeout_remove(&conn->to_input);

while ((line = i_stream_next_line(conn->input)) != NULL) {
T_BEGIN {
ret = dict_command_input(conn, line);
Expand All @@ -130,9 +133,6 @@ static void dict_connection_input(struct dict_connection *conn)
{
const char *line;

if (conn->to_input != NULL)
timeout_remove(&conn->to_input);

switch (i_stream_read(conn->input)) {
case 0:
return;
Expand Down

0 comments on commit 68df459

Please sign in to comment.