reduce default timeouts
We really don't need these to be 2 and 4 seconds. Later we should tune it better based on measurements or estimates. We should also check the relation between these three values. Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
parent
76da855725
commit
5624700855
|
@ -127,7 +127,7 @@ const
|
|||
IpMajorityInterval = 5.minutes ## Interval for checking the latest IP:Port
|
||||
## majority and updating this when SPR auto update is set.
|
||||
InitialLookups = 1 ## Amount of lookups done when populating the routing table
|
||||
ResponseTimeout* = 4.seconds ## timeout for the response of a request-response
|
||||
ResponseTimeout* = 1.seconds ## timeout for the response of a request-response
|
||||
MaxProvidersEntries* = 1_000_000 # one million records
|
||||
MaxProvidersPerEntry* = 20 # providers per entry
|
||||
## call
|
||||
|
|
|
@ -15,9 +15,9 @@ import
|
|||
"."/[node, encoding, sessions]
|
||||
|
||||
const
|
||||
handshakeTimeout* = 2.seconds ## timeout for the reply on the
|
||||
handshakeTimeout* = 500.milliseconds ## timeout for the reply on the
|
||||
## whoareyou message
|
||||
responseTimeout* = 4.seconds ## timeout for the response of a request-response
|
||||
responseTimeout* = 1.seconds ## timeout for the response of a request-response
|
||||
## call
|
||||
|
||||
type
|
||||
|
@ -116,8 +116,7 @@ proc sendWhoareyou(t: Transport, toId: NodeId, a: Address,
|
|||
let data = encodeWhoareyouPacket(t.rng[], t.codec, toId, a, requestNonce,
|
||||
recordSeq, pubkey)
|
||||
sleepAsync(handshakeTimeout).addCallback() do(data: pointer):
|
||||
# TODO: should we still provide cancellation in case handshake completes
|
||||
# correctly?
|
||||
# handshake key is popped in decodeHandshakePacket. if not yet popped by timeout:
|
||||
if t.codec.hasHandshake(key):
|
||||
debug "Handshake timeout", myport = t.bindAddress.port , dstId = toId, address = a
|
||||
t.codec.handshakes.del(key)
|
||||
|
|
Loading…
Reference in New Issue