Skip to content

Commit b580549

Browse files
authored
Fix a crash from fuzz tests (#556)
1 parent ac0c417 commit b580549

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

‎script/linux-grpc-test-long-run

+1-1
Original file line numberDiff line numberDiff line change
@@ -220,4 +220,4 @@ detect_memory_leak_final && MEMORY_LEAK=0 || MEMORY_LEAK=1
220220
# This is to be consistent with other http stress tests.
221221
# All failure will be analyzed by release-engineers.
222222
223-
exit $((${GRPC_STRESS_FAILURES} + ${MEMORY_LEAK}))
223+
exit $((${GRPC_STRESS_FAILURES} + ${HTTP_STRESS_FAILURES} + ${MEMORY_LEAK}))

‎src/nginx/grpc_server_call.cc

+3
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,9 @@ void NgxEspGrpcServerCall::UpdateResponseMessageStat(int64_t size) {
225225

226226
void NgxEspGrpcServerCall::SetGrpcUpstreamCancel(
227227
std::function<void()> grpc_upstream_cancel) {
228+
if (!cln_.data) {
229+
return;
230+
}
228231
ngx_esp_request_ctx_t *ctx = ngx_http_esp_ensure_module_ctx(r_);
229232
ctx->grpc_upstream_cancel =
230233
std::unique_ptr<std::function<void()>>(new auto(grpc_upstream_cancel));

0 commit comments

Comments
 (0)