summaryrefslogtreecommitdiffhomepage
path: root/go/port.go
diff options
context:
space:
mode:
authorAndrei Belov <defan@nginx.com>2020-08-13 19:28:27 +0300
committerAndrei Belov <defan@nginx.com>2020-08-13 19:28:27 +0300
commitaff76e4f90b4e948c327ce2b021dc3203c33cbcd (patch)
tree5bd6ac3aa92683777548472984c209bf26d8a971 /go/port.go
parent04ce9f997e0e49e57ce4b5fc4aa98134232a1974 (diff)
parent6473d4b65a99aa10d509220fb99d8c4f65631ed0 (diff)
downloadunit-aff76e4f90b4e948c327ce2b021dc3203c33cbcd.tar.gz
unit-aff76e4f90b4e948c327ce2b021dc3203c33cbcd.tar.bz2
Merged with the default branch.1.19.0-1
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