Closed Zai-Kun closed 5 months ago
If you pass a stream to tokio-tungstenite
, it will consume it (generally, there is no guarantee that the stream is usable after as often it's closed by the time you encounter an error).
However, if you're talking about a handshake phase only, this issue has been discussed here: https://github.com/snapview/tungstenite-rs/issues/51
Hey there, I was wondering if there was a way to reply back to the client about the error that had occurred on
accept_async
but I can't figure out anyway to do so. This is what I thought of at first:But as you can obviously see, the
stream
is moved toaccept_async
function thus cannot be used again. Is there any other way to achieve this? I looked through as many issues as I could but I couldn't an issue related to this. Thanks and sorry if this is dumb as I'm fairly new to rust and tokio-tungstenite.