workaround bug for alu

This commit is contained in:
Toshit Chawda 2024-10-27 21:27:45 -07:00
parent 2d73524408
commit 26fd6a3556
No known key found for this signature in database
GPG key ID: 91480ED99E2B3D9D
3 changed files with 74 additions and 60 deletions

View file

@ -367,10 +367,12 @@ impl EpoxyClient {
Box::pin(async move {
let (write, read) = WebSocketWrapper::connect(&wisp_url, &ws_protocols)?;
if !write.wait_for_open().await {
return Err(EpoxyError::WebSocketConnectFailed(
"websocket did not open".to_string(),
));
while write.inner.ready_state() == 0 {
if !write.wait_for_open().await {
return Err(EpoxyError::WebSocketConnectFailed(
"websocket did not open".to_string(),
));
}
}
Ok((
Box::new(read) as Box<dyn WebSocketRead + Send>,