Rev proxy working again

This commit is contained in:
2022-12-30 18:56:44 +01:00
parent 28d7cf68df
commit 9ad1ecf1da
15 changed files with 208 additions and 146 deletions

View File

@@ -16,6 +16,7 @@
#include "lib/proxy.h"
#include "lib/geoip.h"
#include "workers.h"
#include "worker/func.h"
#include <stdio.h>
#include <getopt.h>
@@ -70,8 +71,8 @@ static void accept_cb(void *arg) {
sock *client = &client_ctx->socket;
client->ctx = contexts[0];
socklen_t addr_len = sizeof(client->addr);
int client_fd = accept(fd, &client->addr.sock, &addr_len);
socklen_t addr_len = sizeof(client->_addr);
int client_fd = accept(fd, &client->_addr.sock, &addr_len);
if (client_fd < 0) {
critical("Unable to accept connection");
return;