You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for taking the time to file this. You're absolutely right, this is a bug and I think your fix is correct (although we shouldn't default the minimum timeout to 20, we should just defer to the underlying bootstrap). Could you open a PR to fix this?
Describe the bug
Connection timeout is ignored on last retry or when retries are set to none.
ConnectionManager.startConnecting
uses aConnectionBackoffIterator
to determine theconnectTimeout
here:Sources/GRPC/ConnectionManager.swift#L988
Unfortunately when the
ConnectionBackoffIterator
is on its last (or only) try, it returnsnil
for the next value here:Sources/GRPC/ConnectionBackoff.swift#L140
That means the connection timeout is the bootstrap default, which in my use case is 10 seconds:
swift-nio-transport-services/Sources/NIOTransportServices/NIOTSConnectionBootstrap.swift#L57
To reproduce
Expected behaviour
Call should timeout after 1 second, but it's taking 10 seconds.
Additional information
This is sorta ugly, but it does resolve the issue for me locally:
The text was updated successfully, but these errors were encountered: