Skip to content

Fix big messages, write failures, and delays#2

Open
andreivasiliu wants to merge 3 commits intonot-fl3:masterfrom
andreivasiliu:big-messages
Open

Fix big messages, write failures, and delays#2
andreivasiliu wants to merge 3 commits intonot-fl3:masterfrom
andreivasiliu:big-messages

Conversation

@andreivasiliu
Copy link

Fixed a few things:

  • Messages larger than 256 bytes were being corrupted by the u8 message length
  • Writes were being delayed because of blocking and incomplete writes (my client was lagging behind compared to the server)
  • Reads were potentially discarding bytes (behavior on WouldBlock for read_exact is unspecified)
  • Sprinkled some yield_now()'s in a few places to be nicer

Bumped version because send and send_bin's signatures became incompatible, although most people just need to add an .unwrap() on them.

Ideally this would use fully-blocking calls everywhere, although that for some reason results in massive delays on messages (I'm guessing it interferes with mpsc message passing or something? not sure yet). I might try to rewrite it to block, the code will be simpler.

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.

1 participant

Comments