Subject: Re: [nncp-devel] EOF while decoding 8 bytes / message authentication failed

From: Sergey Matveev <[email-masked]>
Date: Fri, 20 Dec 2019 16:51:06 +0300

*** Frank Doepper [2019-12-20 12:32]:
>If the connection should end after the smaller of both ends' value, I
>wonder why "nncp-call -onlinedeadline 2 otherhost" still lasts exactly 10
>seconds in my case (empty queue on both sides, no onlinedeadline config
>line in config file).

Oh, this is another code's peculiarity. Reading/writing is done with:
conn.SetReadDeadline(time.Now().Add(DefaultDeadline * time.Second)),
where DefaultDeadline is 10 (seconds). So goroutine "ticks" every 10sec
by default and that is why lower onlinedeadline values are not checked
earlier. I will look how to easily change the logic of that.

>How to set -onlinedeadline for nncp-daemon?

Only through per-node onlinedeadline option in configuration file.

-- 
Sergey Matveev (http://www.stargrave.org/)
OpenPGP: CF60 E89A 5923 1E76 E263  6422 AE1A 8109 E498 57EF