Closed tsldevteam closed 4 months ago
If this were implemented as described then the LoggerResponder would no longer log synchronous commands. To get around this problem we could make the LoggerResponder a switchable option on the AsciiCommander.
We'll leave the API as is
The addition of the SynchronousResponder in the Responder chain was originally provided to allow developers to choose where in the chain synchronous commands are handled. This implementation of AsciiCommander's handling of synchronous commands will ensure that only responses from the originating command are waited for - other responses to similar commands will be passed along the chain. So, the location of the SynchronousResponder in the chain no longer matters. Note: in some of the Native SDKs synchronous commands will consume the first response of the correct type even though it may not be from the originating command.
By adding the SynchronousResponder by default the AsciiCommander interface and the AddResponder() method can be simplified - this will also avoid a common developer error of failing to add the SynchronousResponder and then trying to execute a Synchronous command.