Skip to content

Commit

Permalink
Properly calculate error_when_n_packets for any request buffer size
Browse files Browse the repository at this point in the history
  • Loading branch information
lpereira committed Apr 14, 2024
1 parent 0533382 commit 8cd57c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/lwan-thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,12 +450,12 @@ __attribute__((noreturn)) static int process_request_coro(struct coro *coro,
int fd = lwan_connection_get_fd(lwan, conn);
enum lwan_request_flags flags = lwan->config.request_flags;
const size_t request_buffer_size = lwan->config.request_buffer_size;
const int error_when_n_packets = lwan_calculate_n_packets(request_buffer_size);
struct lwan_strbuf strbuf = LWAN_STRBUF_STATIC_INIT;
struct lwan_value buffer;
char *next_request = NULL;
char *header_start[N_HEADER_START];
struct lwan_proxy proxy;
const int error_when_n_packets = lwan_calculate_n_packets(DEFAULT_BUFFER_SIZE);
size_t init_gen;

coro_defer(coro, lwan_strbuf_free_defer, &strbuf);
Expand Down

0 comments on commit 8cd57c3

Please sign in to comment.