Use semaphores to keep track of proxy connections
This commit is contained in:
@ -26,13 +26,13 @@ void proxy_handler_func(client_ctx_t *ctx) {
|
||||
respond(ctx);
|
||||
|
||||
if (ret == 1) {
|
||||
ctx->proxy->in_use = 0;
|
||||
proxy_unlock_ctx(ctx->proxy);
|
||||
ctx->proxy = NULL;
|
||||
} else if (ctx->use_proxy == 0) {
|
||||
proxy_close(ctx->proxy);
|
||||
} else if (ctx->use_proxy == 1) {
|
||||
proxy_handler_2(ctx);
|
||||
ctx->proxy->in_use = 0;
|
||||
proxy_unlock_ctx(ctx->proxy);
|
||||
ctx->proxy = NULL;
|
||||
} else if (ctx->use_proxy == 2) {
|
||||
// WebSocket
|
||||
|
Reference in New Issue
Block a user