manifoldco/torus-cli

Use DialTimeout for the transport settings.

Closed this issue · 2 comments

By implementing DialTimeout instead of Dial for our Socket Dial, we ensure that we don't hang forever.

Currently, if there's an issue, it could be that the dial just "hangs". By enforcing a timeout, we make sure it stops after a certain amount of time.

Seeing that it's a local Dial, I'd suggest a timeout of 1s.

+1 for 1s

By extension of that, we should probably set a Client.Timeout on the api http.Client and registry http.Client we instantiate as well.