Set OnClose shim function
When restoring a task make sure that dead shims are handled. Fixes #2078 Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
@@ -84,9 +84,9 @@ func ShimLocal(exchange *exchange.Exchange) ShimOpt {
|
||||
}
|
||||
|
||||
// ShimConnect is a ShimOpt for connecting to an existing remote shim
|
||||
func ShimConnect() ShimOpt {
|
||||
func ShimConnect(onClose func()) ShimOpt {
|
||||
return func(b *bundle, ns string, ropts *runctypes.RuncOptions) (shim.Config, client.Opt) {
|
||||
return b.shimConfig(ns, ropts), client.WithConnect(b.shimAddress(ns))
|
||||
return b.shimConfig(ns, ropts), client.WithConnect(b.shimAddress(ns), onClose)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user