zubairhamed / canopus

CoAP Client/Server implementing RFC 7252 for the Go Language
Apache License 2.0
155 stars 41 forks source link

calculate blockPayloadStart wrong when send blocks #94

Closed zltl closed 6 years ago

zltl commented 7 years ago

if blockSize = 2, blockPayloadStart should be 0, 2, 4, 6 ... but your formulation: blockPayloadStart = currSeq*uint32(blockSize) + (currSeq * 1) will generate 0, 3, 6 ...

zltl commented 7 years ago

set file examples/block1/ietf-block.htm to 3m, then run the test, you will get a panic due to this error.