File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,7 +41,6 @@ public ButtplugServer GetServer()
4141 [ OneTimeSetUp ]
4242 public void OneTimeSetUp ( )
4343 {
44- SynchronizationContext . SetSynchronizationContext ( new SynchronizationContext ( ) ) ;
4544 _logMgr = new ButtplugLogManager ( ) ;
4645 _devMgr = new DeviceManager ( new ButtplugLogManager ( ) ) ;
4746 _subtypeMgr = new TestDeviceSubtypeManager ( ) ;
Original file line number Diff line number Diff line change 11using System ;
22using System . Collections . Concurrent ;
33using System . Collections . Generic ;
4- using System . Text ;
54using System . Threading ;
65using System . Threading . Tasks ;
76using Buttplug . Core ;
87using Buttplug . Core . Messages ;
98using JetBrains . Annotations ;
10- using SuperSocket . ClientEngine ;
119using WebSocket4Net ;
1210using static Buttplug . Client . DeviceEventArgs ;
1311
@@ -97,7 +95,7 @@ public ButtplugWSClient(string aClientName)
9795 _bpLogger = _bpLogManager . GetLogger ( GetType ( ) ) ;
9896 _parser = new ButtplugJsonMessageParser ( _bpLogManager ) ;
9997 _bpLogger . Info ( "Finished setting up ButtplugClient" ) ;
100- _owningDispatcher = SynchronizationContext . Current ;
98+ _owningDispatcher = SynchronizationContext . Current ?? new SynchronizationContext ( ) ;
10199 _tokenSource = new CancellationTokenSource ( ) ;
102100 }
103101
You can’t perform that action at this time.
0 commit comments