It reads better to have a dial timeout of 10s followed by a handshake with a 5s timeout, instead of relying on the outer context wrapping in a 30s overall timeout to connectOutbound.
The previous code could allow a handshake up to 20s but this was only to deal with the potential of there being reconnect attempts, which are now gone.
It reads better to have a dial timeout of 10s followed by a handshake with a 5s timeout, instead of relying on the outer context wrapping in a 30s overall timeout to connectOutbound.
The previous code could allow a handshake up to 20s but this was only to deal with the potential of there being reconnect attempts, which are now gone.