From 622e37f1efb48a710f5bf68aaa059f594a7d4a8e Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Wed, 25 Dec 2019 15:58:25 +0300 Subject: [PATCH] Fix onlinedeadline workability of pipes --- VERSION | 2 +- doc/install.texi | 2 +- doc/news.ru.texi | 10 ++++++++++ doc/news.texi | 10 ++++++++++ ports/nncp/Makefile | 4 ++-- src/pipe.go | 1 + src/sp.go | 4 +--- 7 files changed, 26 insertions(+), 7 deletions(-) diff --git a/VERSION b/VERSION index 03f488b..c7cb131 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5.3.0 +5.3.1 diff --git a/doc/install.texi b/doc/install.texi index 5db01d0..413de36 100644 --- a/doc/install.texi +++ b/doc/install.texi @@ -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: diff --git a/doc/news.ru.texi b/doc/news.ru.texi index ba34716..813ab2b 100644 --- a/doc/news.ru.texi +++ b/doc/news.ru.texi @@ -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 diff --git a/doc/news.texi b/doc/news.texi index 9d9e877..92ff418 100644 --- a/doc/news.texi +++ b/doc/news.texi @@ -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 diff --git a/ports/nncp/Makefile b/ports/nncp/Makefile index 3b5109b..00943d5 100644 --- a/ports/nncp/Makefile +++ b/ports/nncp/Makefile @@ -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/ diff --git a/src/pipe.go b/src/pipe.go index a250cee..1b50573 100644 --- a/src/pipe.go +++ b/src/pipe.go @@ -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() }) diff --git a/src/sp.go b/src/sp.go index 4f522c9..aca6f18 100644 --- 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 { -- 2.44.0