Skip to content

Conversation

@yjh0502
Copy link
Contributor

@yjh0502 yjh0502 commented May 13, 2018

This PR introduces parse_packet to cleanup packet parsing in Stream. The PR actually fixes several problems/bugs.

  • EOF handling: AyncRead returns Ready(0) on EOF, but Stream didn't handle it correctly [1]. The PR handles the problem.
  • Ensure that exact amount of data is fed into PacketParser. It seems that PacketParser required to receive exact amount of data returned by PacketParser::parse.

The PR solves problems I observed while using the library.

[1] https://github.com/blackbeam/mysql_async/blob/master/src/io/mod.rs#L298

@blackbeam blackbeam merged commit a8a1503 into blackbeam:master May 14, 2018
@blackbeam
Copy link
Owner

Thanks for your work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants