We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb56a26 commit 1493366Copy full SHA for 1493366
1 file changed
Buttplug.Server.Managers.ErosTek/ETSerialManager.cs
@@ -40,8 +40,9 @@ private void ScanSerialPorts(string[] selectedComPorts)
40
{
41
string[] comPortsToScan;
42
_isScanning = true;
43
+ var count = 5;
44
- while (_isScanning)
45
+ while (_isScanning && count-- > 0)
46
47
// Enumerate Ports
48
if (selectedComPorts == null || selectedComPorts.Length == 0)
@@ -148,6 +149,12 @@ private void ScanSerialPorts(string[] selectedComPorts)
148
149
// _isScanning = false; // Uncomment to disable continuuous serial port scanning
150
}
151
152
+ if (count < 0)
153
+ {
154
+ BpLogger.Info("Automatically Stopping Scanning Serial Ports for ErosTek Devices");
155
+ }
156
+
157
+ _isScanning = false;
158
InvokeScanningFinished();
159
160
0 commit comments