diff --git a/gb28181-mocking-service/src/main/java/cn/skcks/docking/gb28181/mocking/service/gb28181/register/RegisterService.java b/gb28181-mocking-service/src/main/java/cn/skcks/docking/gb28181/mocking/service/gb28181/register/RegisterService.java index 37699d2..6b21409 100644 --- a/gb28181-mocking-service/src/main/java/cn/skcks/docking/gb28181/mocking/service/gb28181/register/RegisterService.java +++ b/gb28181-mocking-service/src/main/java/cn/skcks/docking/gb28181/mocking/service/gb28181/register/RegisterService.java @@ -50,10 +50,10 @@ public class RegisterService { public DeferredResult> register() { DeferredResult> result = new DeferredResult<>(TimeUnit.SECONDS.toMillis(TIMEOUT)); - List allDevice = deviceService.getAllDevice(); + List enabledDevice = deviceService.getAllEnabledDevice(); - List>[]> completableFutures = ListUtil.split(allDevice, 10).stream().map(items -> { - CompletableFuture>[] array = allDevice.stream().map(this::register).toArray(CompletableFuture[]::new); + List>[]> completableFutures = ListUtil.split(enabledDevice, 10).stream().map(items -> { + CompletableFuture>[] array = enabledDevice.stream().map(this::register).toArray(CompletableFuture[]::new); CompletableFuture.allOf(array); return array; }).toList();