Splitted channels require explicitly set set_auto_ping, set_auto_close to false, otherwise frames are being captured without write, which creates wrong frames in reader channel, i.e. instead of OpCode::Ping, reader reads OpCode::Pong on server Ping.
let (mut ws, _) =
fastwebsockets::handshake::client(&SpawnExecutor, req, tls_stream).await?;
ws.set_auto_pong(false);
ws.set_auto_close(false);
let (rx, tx) = ws.split(tokio::io::split);
let rx = FragmentCollectorRead::new(rx);
Ok((rx, tx))
Splitted channels require explicitly set set_auto_ping, set_auto_close to false, otherwise frames are being captured without write, which creates wrong frames in reader channel, i.e. instead of OpCode::Ping, reader reads OpCode::Pong on server Ping.