We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 923f1b2 + c0dd9bd commit 5f7e384Copy full SHA for 5f7e384
net.go
@@ -7,6 +7,7 @@ import (
7
"fmt"
8
"hash/crc32"
9
"io"
10
+ "math"
11
"net"
12
"sync/atomic"
13
"time"
@@ -1089,6 +1090,12 @@ func (m *Memberlist) decryptRemoteState(bufConn io.Reader, streamLabel string) (
1089
1090
moreBytes := binary.BigEndian.Uint32(cipherText.Bytes()[1:5])
1091
if moreBytes > maxPushStateBytes {
1092
return nil, fmt.Errorf("Remote node state is larger than limit (%d)", moreBytes)
1093
+
1094
+ }
1095
1096
+ //Start reporting the size before you cross the limit
1097
+ if moreBytes > uint32(math.Floor(.6*maxPushStateBytes)) {
1098
+ m.logger.Printf("[WARN] memberlist: Remote node state size is (%d) limit is (%d)", moreBytes, maxPushStateBytes)
1099
}
1100
1101
// Read in the rest of the payload
0 commit comments