]> Cypherpunks.ru repositories - nncp.git/commitdiff
Fix onlinedeadline workability of pipes
authorSergey Matveev <stargrave@stargrave.org>
Wed, 25 Dec 2019 12:58:25 +0000 (15:58 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Wed, 25 Dec 2019 12:58:25 +0000 (15:58 +0300)
VERSION
doc/install.texi
doc/news.ru.texi
doc/news.texi
ports/nncp/Makefile
src/pipe.go
src/sp.go

diff --git a/VERSION b/VERSION
index 03f488b076ae34efcfad44444186507b6415e8cc..c7cb1311a645f7c6c54caec24df8040e7e21e4fb 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5.3.0
+5.3.1
index 5db01d04bbe4c770d1768a205e9befd393638b6b..413de36fe72141c48f12c95632c0b95a8b7d5cf3 100644 (file)
@@ -1,7 +1,7 @@
 @node Installation
 @unnumbered Installation
 
-@set VERSION 5.3.0
+@set VERSION 5.3.1
 
 Possibly NNCP package already exists for your distribution:
 
index ba347167b8a4416a48c6fa79f943b5d3e8d0920b..813ab2be065e98c8402457bb087883ed873dc016 100644 (file)
@@ -1,6 +1,16 @@
 @node Новости
 @section Новости
 
+@node Релиз 5.3.1
+@subsection Релиз 5.3.1
+@itemize
+
+@item
+Исправлена работоспособность @option{onlinedeadline} с адресами вызова
+использующими внешние команды (@verb{#"|somecmd"#}).
+
+@end itemize
+
 @node Релиз 5.3.0
 @subsection Релиз 5.3.0
 @itemize
index 9d9e877d85548015168275447680c26bead33777..92ff418e8ea842ea50e7e4b967b84ae2dd262561 100644 (file)
@@ -3,6 +3,16 @@
 
 See also this page @ref{Новости, on russian}.
 
+@node Release 5.3.1
+@section Release 5.3.1
+@itemize
+
+@item
+Fixed @option{onlinedeadline} workability with call addresses that use
+external commands (@verb{#"|somecmd"#}).
+
+@end itemize
+
 @node Release 5.3.0
 @section Release 5.3.0
 @itemize
index 3b5109ba60f467b98edf963586992ebc2e38cdcd..00943d5dadeec95779be89bb0c14eee2caa914b8 100644 (file)
@@ -1,7 +1,7 @@
-# $FreeBSD: head/net/nncp/Makefile 517819 2019-11-17 11:51:56Z dmgk $
+# $FreeBSD: $
 
 PORTNAME=      nncp
-DISTVERSION=   5.3.0
+DISTVERSION=   5.3.1
 CATEGORIES=    net
 MASTER_SITES=  http://www.nncpgo.org/download/
 
index a250ceedd2b2548140ec69bae513ee5f1dfb3e50..1b50573bf75fb983283452f9b2c746f844a7ab2d 100644 (file)
@@ -65,6 +65,7 @@ func (c PipeConn) SetWriteDeadline(t time.Time) error {
 }
 
 func (c PipeConn) Close() (err error) {
+       c.r.Close()
        err = c.w.Close()
        go c.cmd.Wait()
        time.AfterFunc(time.Duration(10*time.Second), func() { c.cmd.Process.Kill() })
index 4f522c9b52ac1512fd70941090f430d88b0b1f43..aca6f18c1824caf6d5908609b88c22841cb29c59 100644 (file)
--- a/src/sp.go
+++ b/src/sp.go
@@ -22,7 +22,6 @@ import (
        "crypto/subtle"
        "errors"
        "io"
-       "net"
        "os"
        "path/filepath"
        "sort"
@@ -767,8 +766,7 @@ func (state *SPState) StartWorkers(
                                        break
                                }
                                unmarshalErr := err.(*xdr.UnmarshalError)
-                               netErr, ok := unmarshalErr.Err.(net.Error)
-                               if ok && netErr.Timeout() {
+                               if os.IsTimeout(unmarshalErr.Err) {
                                        continue
                                }
                                if unmarshalErr.ErrorCode == xdr.ErrIO {