Commit 75314c2b authored by Philipp Schafft's avatar Philipp Schafft 🦁

Fix: Corrects setup of client_t in client mode.

Closes: #2336
parent c40d12a1
Pipeline #262 failed with stage
in 12 seconds
......@@ -144,6 +144,14 @@ void client_complete(client_t *client)
}
}
if (!have) {
if (client->parser->req_type == httpp_req_none) {
/* We are a client. If the server did not tell us, we asume streaming. */
client->request_body_length = -1; /* streaming */
have = 1;
}
}
ICECAST_LOG_DEBUG("Client %p has request_body_length=%zi", client, client->request_body_length);
}
......
......@@ -285,6 +285,7 @@ static client_t *open_relay_connection (relay_server *relay)
global_unlock ();
sock_set_blocking (streamsock, 0);
client_set_queue (client, NULL);
client_complete(client);
free (server);
free (mount);
free (server_id);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment