Skip to content

Commit

Permalink
Merge pull request #175 from wujun8/fix-monoerror
Browse files Browse the repository at this point in the history
fix: Mono in Mono error
  • Loading branch information
zhou-hao authored Jun 20, 2022
2 parents f3c5ab6 + b1f3488 commit bcf3720
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public Mono<GatewayDeviceInfo> bindDevice(@PathVariable @Parameter(description =
.flatMap(operator -> operator.setConfig(DeviceConfigKey.parentGatewayId, gatewayId))
).then(registry.getDevice(gatewayId)
.flatMap(gwOperator -> gwOperator.getProtocol()
.map(protocolSupport -> protocolSupport.onChildBind(gwOperator,
.flatMap(protocolSupport -> protocolSupport.onChildBind(gwOperator,
Flux.from(registry.getDevice(deviceId)))
)
)
Expand Down Expand Up @@ -177,7 +177,7 @@ public Mono<GatewayDeviceInfo> bindDevice(@PathVariable @Parameter(description =
.then()
).then(registry.getDevice(gatewayId)
.flatMap(gwOperator -> gwOperator.getProtocol()
.map(protocolSupport -> protocolSupport.onChildBind(gwOperator,
.flatMap(protocolSupport -> protocolSupport.onChildBind(gwOperator,
Flux.fromIterable(deviceIdList).flatMap(id -> registry.getDevice(id)))
)
)
Expand All @@ -202,7 +202,7 @@ public Mono<GatewayDeviceInfo> unBindDevice(@PathVariable @Parameter(description
.flatMap(operator -> operator.removeConfig(DeviceConfigKey.parentGatewayId.getKey())))
.then(registry.getDevice(gatewayId)
.flatMap(gwOperator -> gwOperator.getProtocol()
.map(protocolSupport -> protocolSupport.onChildUnbind(gwOperator,
.flatMap(protocolSupport -> protocolSupport.onChildUnbind(gwOperator,
Flux.from(registry.getDevice(deviceId)))
)
)
Expand Down

0 comments on commit bcf3720

Please sign in to comment.