veyron/runtimes/google/ipc: Flush the relevant namespace cache entry if a startCall
fails for a reason other than a resolution not finding anything. This is to try
to more quickly survive server restarts that might end up with a different ip
address, port, or routeid.
Change-Id: If278c9a8a0af573330c23153d0cb7d9879c8f539
diff --git a/runtimes/google/ipc/client.go b/runtimes/google/ipc/client.go
index 7dc06da..1ccb51b 100644
--- a/runtimes/google/ipc/client.go
+++ b/runtimes/google/ipc/client.go
@@ -168,6 +168,9 @@
return fc, nil
}
if lastErr != nil {
+ // If there was any problem starting the call, flush the cache entry under the
+ // assumption that it was caused by stale data.
+ c.ns.FlushCacheEntry(name)
return nil, lastErr
}
return nil, errNoServers