#Issues with websocket
6 messages · Page 1 of 1 (latest)
have you tried adding logging? what did you observe if so?
You have breaks in the server code. Aren't those just resulting in it exiting after the first message?
did you try adding more logging yet?
Yeah, I would recommend adding more logging even though we found this issue; adding more logging might have helped to find the issue sooner. For instance, I'd add logging when running write.send, write_tx.try_send, when the message reading loop exits, etc.
You could store write in an option, and use server_lock.add(write.take().unwrap(), name).await, or better yet, use an if let instead of the unwrap, for proper error handling.