Plugins: FastCGI: use new 'request_done' feature
@@ -565,8 +565,7 @@ int fcgi_exit(struct fcgi_handler *handler)
* some corruption. If there is still some data enqueued, just
* defer the exit process.
*/
- if (mk_channel_is_empty(handler->cs->channel) != 0 &&
- handler->eof == MK_FALSE) {
+ if (handler->eof == MK_FALSE) {
MK_TRACE("[fastcgi=%i] deferring exit, EOF stream",
handler->server_fd);
@@ -591,7 +590,7 @@ int fcgi_exit(struct fcgi_handler *handler)
if (handler->active == MK_TRUE) {
handler->active = MK_FALSE;
- mk_api->http_request_end(handler->cs, handler->hangup);
+ mk_api->http_request_done(handler->sr, handler->hangup);
}
handler->hangup = MK_TRUE;
@@ -706,6 +705,7 @@ int cb_fastcgi_on_read(void *data)
n = read(handler->server_fd, handler->buf_data + handler->buf_len, avail);
MK_TRACE("[fastcgi=%i] read()=%i", handler->server_fd, n);
if (n <= 0) {
+ MK_TRACE("[fastcgi=%i] FastCGI server ended", handler->server_fd);
fcgi_exit(handler);
return -1;
}
