Skip to content

Commit

Permalink
add/remove instead of register/deregister controller, for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
lhoward committed Jan 12, 2024
1 parent f2ff0d4 commit 54a83a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ actor AES70OCP1FlyingFoxController: AES70ControllerPrivate {
self.endpoint = endpoint

Task { @AES70Device in
await self.endpoint?.register(controller: self)
await self.endpoint?.add(controller: self)
do {
for try await (message, rrq) in inputStream.ocp1DecodedMessages {
var response: Ocp1Response?
Expand Down Expand Up @@ -105,7 +105,7 @@ actor AES70OCP1FlyingFoxController: AES70ControllerPrivate {
} catch {
await self.endpoint?.logger.logError(error, on: self)
}
await self.endpoint?.deregister(controller: self)
await self.endpoint?.remove(controller: self)
await self.close()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ public final class AES70OCP1FlyingFoxDeviceEndpoint: AES70BonjourRegistrableDevi
}
}

func register(controller: AES70OCP1FlyingFoxController) {
func add(controller: AES70OCP1FlyingFoxController) {
_controllers.append(controller)
logger.logControllerAdded(controller)
}

func deregister(controller: AES70OCP1FlyingFoxController) {
func remove(controller: AES70OCP1FlyingFoxController) {
_controllers.removeAll(where: { $0.id == controller.id })
logger.logControllerRemoved(controller)
}
Expand Down

0 comments on commit 54a83a3

Please sign in to comment.