Skip to content
Discussion options

You must be logged in to vote

No, in fact all the "failure" states you see in the code only occur when there was backpressure built up during writing to the socket. So the example is correct in that way. Failure basically means it failed to be written in one go.

But I agree returning true is probably a bit unintuitive when the send was completely dropped due too high backpressure, but this is more an issue with the bool only having 2 states.

Usually you should avoid even running into this case by checking bufferedAmount and implementing your own backpressure handling. It was actually a bit more severe of an issue when the documentation was out of date regarding maxBackpressure being used for ws.send (this is now fixed…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #420 on December 25, 2020 22:19.