Correct discardInput comment for buffer size.

This was pointed out by kaptin on IRC.
This commit is contained in:
Dave Collins 2013-05-09 13:00:00 -05:00
parent 3cd90355df
commit c369c0c16e

View file

@ -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 {