eclipse-uprotocol / up-spec

uProtocol Specifications
Apache License 2.0
31 stars 25 forks source link

Clarify UTransport registerListener() & unregisterListener() when passed the same parameters #193

Closed stevenhartley closed 1 month ago

stevenhartley commented 1 month ago

The uP-L1 uTransport specification does not explicitly state what implementations should do when you call the methods multiple times passing the same parameters. We can either make the API idempotent whereby the API simply returns UCode.OK or we make the API return a failure of uCode.ALREADY_EXISTS. This issue will be used to propose a change to the spec to pick the former and not the latter.