Hello, I'm trying out this lib and found that it may not be able to handle heavy loads?
Under normal circumstances everything works fine. But as soon as I subscribe to more server events, it drops.
Should I reconnect in this case? If yes how?
let (ws_stream, _) = connect_async(&base).await.unwrap();
let (write, read) = ws_stream.split();
let ws_to_stdout = read.for_each(|message| async move {
dbg!(&message);
let msg = match message {
Ok(m) => m,
Err(_) => {
// 2021-09-02 20:57:00 - ERROR: Error reading message: Protocol(ResetWithoutClosingHandshake)
todo!()
}
};
After roughly 1 minute, the connection gets dropped. No ping frame received.
2021-09-02 20:57:00 - ERROR: Error reading message: Protocol(ResetWithoutClosingHandshake)
Update: I found that this only happens when using dbg!() or printing anything to the console. Is there any way to prevent this?