This commit is contained in:
2023-01-03 14:06:59 +01:00
parent e82869e993
commit 27d514ae12
4 changed files with 5 additions and 4 deletions

View File

@ -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);