This PR makes packets1.Connect code fully covered by unit tests. Two minor code fixes are also added because I don't think they deserve their own PRs.
The first commit adds a protocol version check to Connect.Unpack() - if the version is not 1, we should not parse the packet at all because we would get garbage data.
This PR makes
packets1.Connect
code fully covered by unit tests. Two minor code fixes are also added because I don't think they deserve their own PRs.The first commit adds a protocol version check to
Connect.Unpack()
- if the version is not 1, we should not parse the packet at all because we would get garbage data.