This effectively transforms a "no timeout" to a "timeout now" operation.
My suggestion (contained on the referenced pull request) would be not to add the same logic as we have on /templates/clientSyncServiceImpl.ftl, but instead extract it to to a centralized point inside the fromTimeout static method.
The timeout to TimeConstraint conversion is not considering the case of no timeout (timeout == 0) for the AsyncClient.
cougar-codegen-plugin/templates/client-impl.ftl
DefaultTimeConstraints.fromTimeout(timeoutMillis)
This effectively transforms a "no timeout" to a "timeout now" operation.
My suggestion (contained on the referenced pull request) would be not to add the same logic as we have on /templates/clientSyncServiceImpl.ftl, but instead extract it to to a centralized point inside the fromTimeout static method.