From f3d5c49c31c59f699288799353b7bc1ba9211f38 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Sat, 28 Dec 2019 14:45:14 +0300 Subject: [PATCH] Fix RxLastNonPing setting --- VERSION | 2 +- doc/install.texi | 2 +- doc/news.ru.texi | 11 +++++++++++ doc/news.texi | 11 +++++++++++ ports/nncp/Makefile | 2 +- src/sp.go | 6 +++--- 6 files changed, 28 insertions(+), 6 deletions(-) diff --git a/VERSION b/VERSION index c7cb131..84197c8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5.3.1 +5.3.2 diff --git a/doc/install.texi b/doc/install.texi index 413de36..55d1499 100644 --- a/doc/install.texi +++ b/doc/install.texi @@ -1,7 +1,7 @@ @node Installation @unnumbered Installation -@set VERSION 5.3.1 +@set VERSION 5.3.2 Possibly NNCP package already exists for your distribution: diff --git a/doc/news.ru.texi b/doc/news.ru.texi index 7361408..791f14e 100644 --- a/doc/news.ru.texi +++ b/doc/news.ru.texi @@ -1,6 +1,17 @@ @node Новости @section Новости +@node Релиз 5.3.2 +@subsection Релиз 5.3.2 +@itemize + +@item +Исправлена некорректная логика @option{onlinedeadline} timeout-а, при +котором соединение могло не учитывать факты прихода пакетов и обрывать +связь. + +@end itemize + @node Релиз 5.3.1 @subsection Релиз 5.3.1 @itemize diff --git a/doc/news.texi b/doc/news.texi index 697ced8..671f6e3 100644 --- a/doc/news.texi +++ b/doc/news.texi @@ -3,6 +3,17 @@ See also this page @ref{Новости, on russian}. +@node Release 5.3.2 +@section Release 5.3.2 +@itemize + +@item +Fixed incorrect logic of @option{onlinedeadline} timeout, where +connection won't take into account incoming packets events and will +forcefully disconnect. + +@end itemize + @node Release 5.3.1 @section Release 5.3.1 @itemize diff --git a/ports/nncp/Makefile b/ports/nncp/Makefile index 00943d5..3efb3ea 100644 --- a/ports/nncp/Makefile +++ b/ports/nncp/Makefile @@ -1,7 +1,7 @@ # $FreeBSD: $ PORTNAME= nncp -DISTVERSION= 5.3.1 +DISTVERSION= 5.3.2 CATEGORIES= net MASTER_SITES= http://www.nncpgo.org/download/ diff --git a/src/sp.go b/src/sp.go index aca6f18..37cf265 100644 --- a/src/sp.go +++ b/src/sp.go @@ -851,6 +851,9 @@ func (state *SPState) ProcessSP(payload []byte) ([][]byte, error) { state.Ctx.LogE("sp-process", sds, err, "") return nil, err } + if head.Type != SPTypePing { + state.RxLastNonPing = state.RxLastSeen + } switch head.Type { case SPTypeHalt: state.Ctx.LogD("sp-process", SdsAdd(sds, SDS{"type": "halt"}), "") @@ -1086,9 +1089,6 @@ func (state *SPState) ProcessSP(payload []byte) ([][]byte, error) { ) return nil, BadPktType } - if head.Type != SPTypePing { - state.RxLastNonPing = state.RxLastSeen - } } if infosGot { var pkts int -- 2.44.0