improved offload api

This commit is contained in:
Unbit
2014-10-01 01:35:09 +02:00
parent f37043679c
commit 73cc2f0a3a
2 changed files with 9 additions and 0 deletions
+6
View File
@@ -159,6 +159,12 @@ static int u_offload_sendfile_prepare(struct wsgi_request *wsgi_req, struct uwsg
}
static void uwsgi_offload_close(struct uwsgi_thread *ut, struct uwsgi_offload_request *uor) {
// call the free function asap
if (uor->free) {
uor->free(uor);
}
// close the socket and the file descriptor
if (uor->takeover && uor->s > -1) {
close(uor->s);
+3
View File
@@ -4334,6 +4334,9 @@ struct uwsgi_offload_request {
int64_t custom6;
int64_t custom7;
int64_t custom8;
void *data;
void (*free)(struct uwsgi_offload_request *);
};
struct uwsgi_offload_engine {