]> Cypherpunks.ru repositories - nncp.git/commitdiff
Fix RxLastNonPing setting
authorSergey Matveev <stargrave@stargrave.org>
Sat, 28 Dec 2019 11:45:14 +0000 (14:45 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sat, 28 Dec 2019 11:49:14 +0000 (14:49 +0300)
VERSION
doc/install.texi
doc/news.ru.texi
doc/news.texi
ports/nncp/Makefile
src/sp.go

diff --git a/VERSION b/VERSION
index c7cb1311a645f7c6c54caec24df8040e7e21e4fb..84197c89467dd225393910da7c61a7a480822820 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5.3.1
+5.3.2
index 413de36fe72141c48f12c95632c0b95a8b7d5cf3..55d14999ec8900103142d5df26d4965f2b9ffab0 100644 (file)
@@ -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:
 
index 73614086900f782c20ac8764481d6091c50682cf..791f14e8762726419b3d5174d9490a5983bf09e8 100644 (file)
@@ -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
index 697ced820b0f27caa86fc4f0733a5bd6a211c2c3..671f6e3bfe9238ad884b82d3cb9a1c6af1c98175 100644 (file)
@@ -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
index 00943d5dadeec95779be89bb0c14eee2caa914b8..3efb3ea011d4bca4740fbc7b029d2748e6604f34 100644 (file)
@@ -1,7 +1,7 @@
 # $FreeBSD: $
 
 PORTNAME=      nncp
-DISTVERSION=   5.3.1
+DISTVERSION=   5.3.2
 CATEGORIES=    net
 MASTER_SITES=  http://www.nncpgo.org/download/
 
index aca6f18c1824caf6d5908609b88c22841cb29c59..37cf265ead11ac3588fcb66eab69f7641599cc9c 100644 (file)
--- 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