Skip to content

Commit

Permalink
lib-http: server: Use the new connection_input_halt/resume() functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanbosch authored and villesavolainen committed Mar 12, 2018
1 parent a0b53dc commit 8df7b1f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/lib-http/http-server-connection.c
Expand Up @@ -107,17 +107,15 @@ http_server_connection_get_stats(struct http_server_connection *conn)
static void
http_server_connection_input_halt(struct http_server_connection *conn)
{
io_remove(&conn->conn.io);
connection_input_halt(&conn->conn);
}

static void
http_server_connection_input_resume(struct http_server_connection *conn)
{
if (conn->conn.io == NULL && !conn->closed &&
!conn->input_broken && !conn->close_indicated &&
if (!conn->closed && !conn->input_broken && !conn->close_indicated &&
!conn->in_req_callback && conn->incoming_payload == NULL) {
conn->conn.io = io_add_istream(conn->conn.input,
http_server_connection_input, &conn->conn);
connection_input_resume(&conn->conn);
}
}

Expand Down

0 comments on commit 8df7b1f

Please sign in to comment.