modify write channel size

This commit is contained in:
thinkAfCod 2025-05-14 00:04:57 +08:00 committed by Chen Kai
parent 6f1e38af4b
commit 7714d41097
2 changed files with 2 additions and 2 deletions

View file

@ -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 = 2048 const maxActiveTalkRequests = 1024
// 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.

View file

@ -197,7 +197,7 @@ func newUDPv5(conn UDPConn, ln *enode.LocalNode, cfg Config) (*UDPv5, error) {
sendNoRespCh: make(chan *sendNoRespRequest), sendNoRespCh: make(chan *sendNoRespRequest),
respTimeoutCh: make(chan *callTimeout), respTimeoutCh: make(chan *callTimeout),
unhandled: cfg.Unhandled, unhandled: cfg.Unhandled,
writeCh: make(chan pendingWrite, 256), // Buffered channel for outgoing packets writeCh: make(chan pendingWrite, 1024), // Buffered channel for outgoing packets
// state of dispatch // state of dispatch
codec: v5wire.NewCodec(ln, cfg.PrivateKey, cfg.Clock, cfg.V5ProtocolID), codec: v5wire.NewCodec(ln, cfg.PrivateKey, cfg.Clock, cfg.V5ProtocolID),
activeCallByNode: make(map[enode.ID]*callV5), activeCallByNode: make(map[enode.ID]*callV5),