Auto-reconnect for regular authRPC client. (#3506)

Implement a storage rpc specific rpc client,
which does not reconnect unnecessarily.

Instead reconnect is handled at a different
layer for storage alone.

Rest of the calls using AuthRPC automatically
reconnect, i.e upon an error equal to `rpc.ErrShutdown`
they dial again and call the requested method again.
This commit is contained in:
Harshavardhana
2016-12-29 19:42:02 -08:00
committed by GitHub
parent 41cf580bb1
commit dd68cdd802
5 changed files with 155 additions and 90 deletions

View File

@@ -93,6 +93,10 @@ var (
// giving up on the remote disk entirely.
globalMaxStorageRetryThreshold = 3
// Attempt to retry only this many number of times before
// giving up on the remote RPC entirely.
globalMaxAuthRPCRetryThreshold = 1
// Add new variable global values here.
)