mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 22:26:42 +00:00
add max active talk requests
This commit is contained in:
parent
7714d41097
commit
8d05d5da6d
2 changed files with 3 additions and 3 deletions
|
|
@ -28,7 +28,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// This is a limit for the number of concurrent talk requests.
|
// This is a limit for the number of concurrent talk requests.
|
||||||
const maxActiveTalkRequests = 1024
|
const maxActiveTalkRequests = 2048
|
||||||
|
|
||||||
// This is the timeout for acquiring a handler execution slot for a talk request.
|
// This is the timeout for acquiring a handler execution slot for a talk request.
|
||||||
// The timeout should be short enough to fit within the request timeout.
|
// The timeout should be short enough to fit within the request timeout.
|
||||||
|
|
|
||||||
|
|
@ -774,8 +774,8 @@ func (t *UDPv5) send(toID enode.ID, toAddr netip.AddrPort, packet v5wire.Packet,
|
||||||
t.logcontext = append(t.logcontext, "rawpacket", hexutil.Encode(enc))
|
t.logcontext = append(t.logcontext, "rawpacket", hexutil.Encode(enc))
|
||||||
t.log.Trace(">> "+packet.Name(), t.logcontext...)
|
t.log.Trace(">> "+packet.Name(), t.logcontext...)
|
||||||
|
|
||||||
dataForSend := bufferpool.Get(len(enc))
|
dataForSend := bufferpool.Get(len(enc))[:0]
|
||||||
copy(dataForSend, enc)
|
dataForSend = append(dataForSend, enc...)
|
||||||
|
|
||||||
pw := pendingWrite{
|
pw := pendingWrite{
|
||||||
toAddr: toAddr,
|
toAddr: toAddr,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue