amir / raidman

Go Riemann client
The Unlicense
67 stars 25 forks source link

ensure tcp.Send will read long messages fully #1

Closed swdunlop closed 11 years ago

swdunlop commented 11 years ago

TCP connections may not complete a read request if it exceeds the available data, resulting in short reads that confuse pb.Unmarshal with a long tail of null bytes:

!! proto: illegal tag 0

This pull request reads in a loop until the response is complete or an error is presented. You might also want to place a license in you repo -- I release the enclosed commits to the public domain. Thanks for the package, @amir. :)

amir commented 11 years ago

Hi Scott,

Thanks! Just merged your patch. And thank you for releasing it in public domain.

UNLICENSEd the code.