From da0826e99f2c2144ea8e4b9a8b42f30ccf3203fa Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Mon, 8 Nov 2021 23:04:38 +0300 Subject: Go: fixing racing condition on app start. Request procesing loop should be started in ready handler to avoid race between go-routine start and context ready flag assignment. The issue introduced in 43553aa72111. --- go/nxt_cgo_lib.c | 1 + 1 file changed, 1 insertion(+) (limited to 'go/nxt_cgo_lib.c') diff --git a/go/nxt_cgo_lib.c b/go/nxt_cgo_lib.c index 330697c1..3e766b1e 100644 --- a/go/nxt_cgo_lib.c +++ b/go/nxt_cgo_lib.c @@ -30,6 +30,7 @@ nxt_cgo_run(uintptr_t handler) init.callbacks.port_send = nxt_cgo_port_send; init.callbacks.port_recv = nxt_cgo_port_recv; init.callbacks.shm_ack_handler = nxt_go_shm_ack_handler; + init.callbacks.ready_handler = nxt_go_ready; init.data = (void *) handler; -- cgit