mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-03 09:37:38 +00:00
save
This commit is contained in:
parent
5d0f081a9c
commit
f1a493914f
@ -883,7 +883,7 @@ func (ss *SentryServerImpl) send(msgID proto_sentry.MessageId, peerID string, b
|
|||||||
ch := ss.messageStreams[msgID][i]
|
ch := ss.messageStreams[msgID][i]
|
||||||
ch <- req
|
ch <- req
|
||||||
if len(ch) > MessagesQueueSize/2 {
|
if len(ch) > MessagesQueueSize/2 {
|
||||||
log.Warn("[sentry] consuming is slow", "msgID", msgID.String())
|
log.Debug("[sentry] consuming is slow, drop 50% of old messages", "msgID", msgID.String())
|
||||||
// evict old messages from channel
|
// evict old messages from channel
|
||||||
for j := 0; j < MessagesQueueSize/4; j++ {
|
for j := 0; j < MessagesQueueSize/4; j++ {
|
||||||
select {
|
select {
|
||||||
|
Loading…
Reference in New Issue
Block a user