lazy fix for startup crash
This commit is contained in:
parent
7ffef5522b
commit
bf23dbaf80
2 changed files with 7 additions and 0 deletions
|
|
@ -45,6 +45,7 @@
|
||||||
];
|
];
|
||||||
env.LD_LIBRARY_PATH = lib.makeLibraryPath packages;
|
env.LD_LIBRARY_PATH = lib.makeLibraryPath packages;
|
||||||
env.RUST_LOG = "jong=trace";
|
env.RUST_LOG = "jong=trace";
|
||||||
|
env.RUST_BACKTRACE = "full";
|
||||||
|
|
||||||
# https://devenv.sh/languages/
|
# https://devenv.sh/languages/
|
||||||
languages.rust = {
|
languages.rust = {
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
use std::time::Duration;
|
||||||
|
|
||||||
use bevy::prelude::*;
|
use bevy::prelude::*;
|
||||||
use bevy_spacetimedb::{ReadInsertMessage, ReadInsertUpdateMessage, ReadUpdateMessage, StdbPlugin};
|
use bevy_spacetimedb::{ReadInsertMessage, ReadInsertUpdateMessage, ReadUpdateMessage, StdbPlugin};
|
||||||
|
|
||||||
|
|
@ -74,6 +76,10 @@ impl Plugin for Riichi {
|
||||||
/// spawn all hands and ponds
|
/// spawn all hands and ponds
|
||||||
|
|
||||||
fn subscriptions(stdb: SpacetimeDB, mut commands: Commands) {
|
fn subscriptions(stdb: SpacetimeDB, mut commands: Commands) {
|
||||||
|
while stdb.try_identity().is_none() {
|
||||||
|
bevy::platform::thread::sleep(Duration::from_secs(1));
|
||||||
|
}
|
||||||
|
|
||||||
let (tx, rx) = std::sync::mpsc::channel();
|
let (tx, rx) = std::sync::mpsc::channel();
|
||||||
stdb.subscription_builder()
|
stdb.subscription_builder()
|
||||||
.on_applied(move |_| {
|
.on_applied(move |_| {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue