Correct discardInput comment for buffer size.
This was pointed out by kaptin on IRC.
This commit is contained in:
parent
3cd90355df
commit
c369c0c16e
1 changed files with 1 additions and 1 deletions
|
@ -145,7 +145,7 @@ func readMessageHeader(r io.Reader) (*messageHeader, error) {
|
|||
// prevent rogue nodes from causing massive memory allocation through forging
|
||||
// header length.
|
||||
func discardInput(r io.Reader, n uint32) {
|
||||
maxSize := uint32(10240) // 2k at a time
|
||||
maxSize := uint32(10 * 1024) // 10k at a time
|
||||
numReads := n / maxSize
|
||||
bytesRemaining := n % maxSize
|
||||
if n > 0 {
|
||||
|
|
Loading…
Reference in a new issue