mirror of
https://github.com/osukey/osukey.git
synced 2025-05-30 01:47:30 +09:00
Merge branch 'master' into fix-song-select-first-track-looping
This commit is contained in:
commit
f701a38e20
@ -13,6 +13,7 @@ using Newtonsoft.Json;
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Logging;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Online.API;
|
using osu.Game.Online.API;
|
||||||
using osu.Game.Replays.Legacy;
|
using osu.Game.Replays.Legacy;
|
||||||
@ -122,19 +123,26 @@ namespace osu.Game.Online.Spectator
|
|||||||
isConnected = false;
|
isConnected = false;
|
||||||
playingUsers.Clear();
|
playingUsers.Clear();
|
||||||
|
|
||||||
if (ex != null) await tryUntilConnected();
|
if (ex != null)
|
||||||
|
{
|
||||||
|
Logger.Log($"Spectator client lost connection: {ex}", LoggingTarget.Network);
|
||||||
|
await tryUntilConnected();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
await tryUntilConnected();
|
await tryUntilConnected();
|
||||||
|
|
||||||
async Task tryUntilConnected()
|
async Task tryUntilConnected()
|
||||||
{
|
{
|
||||||
|
Logger.Log("Spectator client connecting...", LoggingTarget.Network);
|
||||||
|
|
||||||
while (api.State.Value == APIState.Online)
|
while (api.State.Value == APIState.Online)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// reconnect on any failure
|
// reconnect on any failure
|
||||||
await connection.StartAsync();
|
await connection.StartAsync();
|
||||||
|
Logger.Log("Spectator client connected!", LoggingTarget.Network);
|
||||||
|
|
||||||
// success
|
// success
|
||||||
isConnected = true;
|
isConnected = true;
|
||||||
@ -151,8 +159,9 @@ namespace osu.Game.Online.Spectator
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
Logger.Log($"Spectator client connection error: {e}", LoggingTarget.Network);
|
||||||
await Task.Delay(5000);
|
await Task.Delay(5000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -419,11 +419,11 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
};
|
};
|
||||||
|
|
||||||
// bring in updates from selection changes
|
// bring in updates from selection changes
|
||||||
EditorBeatmap.HitObjectUpdated += _ => UpdateTernaryStates();
|
EditorBeatmap.HitObjectUpdated += _ => Scheduler.AddOnce(UpdateTernaryStates);
|
||||||
EditorBeatmap.SelectedHitObjects.CollectionChanged += (sender, args) =>
|
EditorBeatmap.SelectedHitObjects.CollectionChanged += (sender, args) =>
|
||||||
{
|
{
|
||||||
Scheduler.AddOnce(updateVisibility);
|
Scheduler.AddOnce(updateVisibility);
|
||||||
UpdateTernaryStates();
|
Scheduler.AddOnce(UpdateTernaryStates);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user