Cleanup
This commit is contained in:
@ -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