fix: 尝试修复示波器与旋转编码器无法工作的问题
This commit is contained in:
@@ -212,11 +212,10 @@ public class OscilloscopeHub : Hub<IOscilloscopeReceiver>, IOscilloscopeHub
|
||||
|
||||
var key = (board.ID.ToString(), Context.ConnectionId);
|
||||
|
||||
if (_scanTasks.TryRemove(key, out var scanInfo))
|
||||
if (_scanTasks.TryRemove(key, out var taskInfo))
|
||||
{
|
||||
scanInfo.CTS.Cancel();
|
||||
if (scanInfo.ScanTask != null) await scanInfo.ScanTask;
|
||||
scanInfo.CTS.Dispose();
|
||||
taskInfo.CTS.Cancel();
|
||||
if (taskInfo.ScanTask != null) taskInfo.ScanTask.Wait();
|
||||
|
||||
var result = await client.SetCaptureEnable(false);
|
||||
if (!result.IsSuccessful)
|
||||
|
||||
Reference in New Issue
Block a user