Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c59977dada | |||
| 77f0eeda6d |
+1
-2
@@ -139,10 +139,9 @@ proxy_ctx_t *proxy_get_by_conf(host_config_t *conf) {
|
|||||||
|
|
||||||
void proxy_unlock_ctx(proxy_ctx_t *ctx) {
|
void proxy_unlock_ctx(proxy_ctx_t *ctx) {
|
||||||
int n = (int) ((ctx - proxies) / MAX_PROXY_CNX_PER_HOST);
|
int n = (int) ((ctx - proxies) / MAX_PROXY_CNX_PER_HOST);
|
||||||
int was_in_use = ctx->in_use;
|
|
||||||
ctx->in_use = 0;
|
ctx->in_use = 0;
|
||||||
ctx->client = NULL;
|
ctx->client = NULL;
|
||||||
if (was_in_use) sem_post(&available[n]);
|
sem_post(&available[n]);
|
||||||
}
|
}
|
||||||
|
|
||||||
int proxy_request_header(http_req *req, sock *sock) {
|
int proxy_request_header(http_req *req, sock *sock) {
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ static int fastcgi_handler_1(client_ctx_t *ctx, fastcgi_cnx_t **fcgi_cnx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void fastcgi_next_cb(chunk_ctx_t *ctx) {
|
static void fastcgi_next_cb(chunk_ctx_t *ctx) {
|
||||||
if(ctx->client->fcgi_ctx) {
|
if (ctx->client->fcgi_ctx) {
|
||||||
fastcgi_close(ctx->client->fcgi_ctx);
|
fastcgi_close(ctx->client->fcgi_ctx);
|
||||||
ctx->client->fcgi_ctx = NULL;
|
ctx->client->fcgi_ctx = NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ void ws_close(ws_ctx_t *ctx) {
|
|||||||
logger_set_prefix("[%*s]%s", ADDRSTRLEN, ctx->client->socket.s_addr, ctx->client->log_prefix);
|
logger_set_prefix("[%*s]%s", ADDRSTRLEN, ctx->client->socket.s_addr, ctx->client->log_prefix);
|
||||||
info("Closing WebSocket connection");
|
info("Closing WebSocket connection");
|
||||||
proxy_close(ctx->client->proxy);
|
proxy_close(ctx->client->proxy);
|
||||||
|
proxy_unlock_ctx(ctx->client->proxy);
|
||||||
tcp_close(ctx->client);
|
tcp_close(ctx->client);
|
||||||
}
|
}
|
||||||
free(ctx);
|
free(ctx);
|
||||||
|
|||||||
Reference in New Issue
Block a user