@bits-innovate/react-native-vstarcam 1.0.26 → 1.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -56,6 +56,9 @@ public class VStarCamModule extends ReactContextBaseJavaModule {
|
|
|
56
56
|
// Set to true for verbose logging during development
|
|
57
57
|
private static final boolean DEBUG_LOGGING = true;
|
|
58
58
|
|
|
59
|
+
// Counter for unique internal client IDs
|
|
60
|
+
private static final java.util.concurrent.atomic.AtomicInteger nextClientPtr = new java.util.concurrent.atomic.AtomicInteger(1000);
|
|
61
|
+
|
|
59
62
|
// Helper for conditional debug logging
|
|
60
63
|
private static void logDebug(String message) {
|
|
61
64
|
if (DEBUG_LOGGING) {
|
|
@@ -460,8 +463,8 @@ public class VStarCamModule extends ReactContextBaseJavaModule {
|
|
|
460
463
|
return;
|
|
461
464
|
}
|
|
462
465
|
|
|
463
|
-
// Generate
|
|
464
|
-
int ourClientPtr =
|
|
466
|
+
// Generate a unique internal client ID
|
|
467
|
+
int ourClientPtr = nextClientPtr.getAndIncrement();
|
|
465
468
|
|
|
466
469
|
ClientInfo clientInfo = new ClientInfo();
|
|
467
470
|
clientInfo.deviceId = deviceId;
|