summaryrefslogtreecommitdiffhomepage
path: root/go/port.go
diff options
context:
space:
mode:
Diffstat (limited to 'go/port.go')
-rw-r--r--go/port.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/go/port.go b/go/port.go
index 59a13f8b..64004d91 100644
--- a/go/port.go
+++ b/go/port.go
@@ -93,7 +93,7 @@ func getUnixConn(fd int) *net.UnixConn {
}
//export nxt_go_add_port
-func nxt_go_add_port(pid C.int, id C.int, rcv C.int, snd C.int) {
+func nxt_go_add_port(ctx C.uintptr_t, pid C.int, id C.int, rcv C.int, snd C.int) {
p := &port{
key: port_key{
pid: int(pid),
@@ -104,6 +104,12 @@ func nxt_go_add_port(pid C.int, id C.int, rcv C.int, snd C.int) {
}
add_port(p)
+
+ if id == 65535 {
+ go func(ctx C.uintptr_t) {
+ C.nxt_cgo_unit_run_shared(ctx);
+ }(ctx)
+ }
}
//export nxt_go_remove_port