improved offload api

This commit is contained in:
Unbit
2014-10-10 10:58:45 +02:00
parent 833193a1ba
commit 865b9c199d
2 changed files with 9 additions and 0 deletions
+6
View File
@@ -162,6 +162,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
@@ -4266,6 +4266,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 {