recover monitoring fd in each sandbox in the chain, otherwise, sledge will stuck at sometimes, the reason needs time to dive in later

main
xiaosuGW 3 years ago
parent 0bfc08e59a
commit 74912c5460

@ -145,7 +145,6 @@ sandbox_open_http(struct sandbox *sandbox)
/* Set the sandbox as the data the http-parser has access to */ /* Set the sandbox as the data the http-parser has access to */
sandbox->http_parser.data = sandbox; //assign data to sandbox in case to operator it when a callback happended sandbox->http_parser.data = sandbox; //assign data to sandbox in case to operator it when a callback happended
if (sandbox->module->next_module == NULL) {
/* Freshly allocated sandbox going runnable for first time, so register client socket with epoll */ /* Freshly allocated sandbox going runnable for first time, so register client socket with epoll */
struct epoll_event accept_evt; struct epoll_event accept_evt;
accept_evt.data.ptr = (void *)sandbox; accept_evt.data.ptr = (void *)sandbox;
@ -154,7 +153,6 @@ sandbox_open_http(struct sandbox *sandbox)
&accept_evt); &accept_evt);
if (unlikely(rc < 0)) panic_err(); if (unlikely(rc < 0)) panic_err();
} }
}
/** /**
* Prints key performance metrics for a sandbox to runtime_sandbox_perf_log * Prints key performance metrics for a sandbox to runtime_sandbox_perf_log

@ -116,6 +116,7 @@ current_sandbox_start(void)
sandbox->request_arrival_timestamp, true, pre_func_output, output_length); sandbox->request_arrival_timestamp, true, pre_func_output, output_length);
/* Add to the Global Sandbox Request Scheduler */ /* Add to the Global Sandbox Request Scheduler */
global_request_scheduler_add(sandbox_request); global_request_scheduler_add(sandbox_request);
sandbox_remove_from_epoll(sandbox);
sandbox_set_as_returned(sandbox, SANDBOX_RUNNING); sandbox_set_as_returned(sandbox, SANDBOX_RUNNING);
} else { } else {
/* Retrieve the result, construct the HTTP response, and send to client */ /* Retrieve the result, construct the HTTP response, and send to client */

Loading…
Cancel
Save