proxy: Properly handle health check responses to VCs that terminate at
the proxy.
Change-Id: I25423eaaacefdbcc46bd001078110c9a676cb5dd
diff --git a/runtime/internal/rpc/stream/proxy/proxy.go b/runtime/internal/rpc/stream/proxy/proxy.go
index a010f18..5e3a32a 100644
--- a/runtime/internal/rpc/stream/proxy/proxy.go
+++ b/runtime/internal/rpc/stream/proxy/proxy.go
@@ -607,9 +607,10 @@
dst.Process.queue.Put(m)
}
case *message.HealthCheckResponse:
- // Note that the proxy never sends health check requests, so responses
- // should always be forwarded.
- if dst := p.Route(m.VCI); dst != nil {
+ if svc := p.ServerVC(m.VCI); svc != nil {
+ // If the request is for the proxy, pass it to the VC.
+ svc.HandleHealthCheckResponse()
+ } else if dst := p.Route(m.VCI); dst != nil {
m.VCI = dst.VCI
dst.Process.queue.Put(m)
}
diff --git a/runtime/internal/rpc/stream/vc/vc.go b/runtime/internal/rpc/stream/vc/vc.go
index c994b16..6687a5d 100644
--- a/runtime/internal/rpc/stream/vc/vc.go
+++ b/runtime/internal/rpc/stream/vc/vc.go
@@ -38,7 +38,7 @@
return verror.Register(verror.ID(pkgPath+id), verror.NoRetry, msg)
}
-const defaultChannelTimeout = 3 * 24 * time.Hour
+const defaultChannelTimeout = 30 * time.Minute
var (
// These errors are intended to be used as arguments to higher