summaryrefslogtreecommitdiffhomepage
path: root/go
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2020-03-30 14:18:51 +0300
committerMax Romanov <max.romanov@nginx.com>2020-03-30 14:18:51 +0300
commit0935630cba069d6619e967404bb6c7c2a93fbe7e (patch)
tree78d08954a3b6af36fc5ed02f51037d1af0d01b26 /go
parentab7b42a072e741b226749c416440f89fcaff3d2c (diff)
downloadunit-0935630cba069d6619e967404bb6c7c2a93fbe7e.tar.gz
unit-0935630cba069d6619e967404bb6c7c2a93fbe7e.tar.bz2
Fixing application process infinite loop.
Main process exiting before app process init may have caused hanging.
Diffstat (limited to 'go')
-rw-r--r--go/port.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/go/port.go b/go/port.go
index a68cae74..72d33d31 100644
--- a/go/port.go
+++ b/go/port.go
@@ -138,6 +138,8 @@ func nxt_go_port_send(pid C.int, id C.int, buf unsafe.Pointer, buf_size C.int,
if err != nil {
nxt_go_warn("write result %d (%d), %s", n, oobn, err)
+
+ n = -1
}
return C.ssize_t(n)
@@ -164,6 +166,8 @@ func nxt_go_port_recv(pid C.int, id C.int, buf unsafe.Pointer, buf_size C.int,
if err != nil {
nxt_go_warn("read result %d (%d), %s", n, oobn, err)
+
+ n = -1
}
return C.ssize_t(n)