Cleanup
This commit is contained in:
@ -9,13 +9,11 @@
|
||||
#include "fastcgi.h"
|
||||
#include "utils.h"
|
||||
#include "compress.h"
|
||||
#include "../server.h"
|
||||
#include "../logger.h"
|
||||
#include "list.h"
|
||||
|
||||
#include <sys/un.h>
|
||||
#include <sys/socket.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
|
@ -19,7 +19,6 @@
|
||||
#define CLIENT_TIMEOUT 3600
|
||||
#define SERVER_TIMEOUT_INIT 4
|
||||
#define SERVER_TIMEOUT 3600
|
||||
#define MAX_CLIENTS 4096
|
||||
|
||||
#define CNX_HANDLER_WORKERS 8
|
||||
#define REQ_HANDLER_WORKERS 16
|
||||
|
@ -27,12 +27,15 @@ void proxy_handler_func(client_ctx_t *ctx) {
|
||||
|
||||
if (ctx->use_proxy == 2) {
|
||||
// WebSocket
|
||||
sock_set_timeout(&ctx->socket, WS_TIMEOUT);
|
||||
sock_set_timeout(&ctx->proxy->proxy, WS_TIMEOUT);
|
||||
info("Upgrading connection to WebSocket connection");
|
||||
if (ws_handle_connection(&ctx->socket, &ctx->proxy->proxy) != 0) {
|
||||
ctx->c_keep_alive = 0;
|
||||
proxy_close(ctx->proxy);
|
||||
}
|
||||
info("WebSocket connection closed");
|
||||
return;
|
||||
}
|
||||
|
||||
proxy_handler_2(ctx);
|
||||
|
@ -12,7 +12,6 @@
|
||||
#include "../lib/mpmc.h"
|
||||
#include "../logger.h"
|
||||
#include "../lib/utils.h"
|
||||
#include "../lib/websocket.h"
|
||||
#include "../server.h"
|
||||
#include "../lib/res.h"
|
||||
|
||||
@ -55,6 +54,7 @@ static int request_handler(client_ctx_t *ctx) {
|
||||
ctx->proxy = NULL;
|
||||
ctx->use_fastcgi = 0;
|
||||
ctx->use_proxy = 0;
|
||||
ctx->ws_close = 0;
|
||||
ctx->proxy = NULL;
|
||||
ctx->msg_content[0] = 0;
|
||||
ctx->msg_buf = NULL;
|
||||
@ -362,6 +362,7 @@ int respond(client_ctx_t *ctx) {
|
||||
snd_len += ret;
|
||||
}
|
||||
} else if (ctx->use_fastcgi) {
|
||||
// FastCGI
|
||||
return 2;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user