Fix crash in netplay windows (#530)

* Fix crash in netplay windows

* more
This commit is contained in:
Logan McNaughton 2025-07-29 23:02:07 +02:00 committed by GitHub
parent 6e652c7dbd
commit a2d23c2f41
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -412,8 +412,11 @@ fn manage_websocket<T: ComponentHandle + NetplayPages + 'static>(
Ok(None) => {
break;
}
Err(err) => {
panic!("netplay_write_receiver error: {err}");
Err(tokio::sync::broadcast::error::RecvError::Lagged(_)) => {
panic!("netplay_write_receiver lagged");
}
Err(tokio::sync::broadcast::error::RecvError::Closed) => {
break; // exit the loop if the receiver is closed
}
}
}