@@ 27,6 27,7 @@ using NosSmooth.Core.Stateful;
using PacketLogger.Models;
using PacketLogger.Models.Packets;
using ReactiveUI;
+using Remora.Results;
namespace PacketLogger.ViewModels;
@@ 145,6 146,14 @@ public class DocumentViewModel : Document, INotifyPropertyChanged, IDisposable
return;
}
+ var handshakeInitResponse = handshakeResponse.InitializationErrorfulResult ?? Result.FromSuccess();
+ if (!handshakeInitResponse.IsSuccess)
+ {
+ repository.Remove(connection.Client);
+ Console.WriteLine(handshakeInitResponse.ToFullString());
+ return;
+ }
+
_cleanUp = process.WhenPropertyChanged(x => x.CharacterString)
.ObserveOn(RxApp.MainThreadScheduler)
.Do