Skip to content

Commit 08483d1

Browse files
committed
v2: Close ttrpc connection when Delete()
This avoids potential socket leak when the connected v2 shim of runtime serving multiple containers. Signed-off-by: Li Yuxuan <[email protected]>
1 parent 29e56c5 commit 08483d1

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

runtime/v2/shim.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ func (s *shim) Delete(ctx context.Context) (*runtime.Exit, error) {
221221
if err := s.waitShutdown(ctx); err != nil {
222222
log.G(ctx).WithError(err).Error("failed to shutdown shim")
223223
}
224+
s.Close()
224225
if err := s.bundle.Delete(); err != nil {
225226
log.G(ctx).WithError(err).Error("failed to delete bundle")
226227
}

0 commit comments

Comments
 (0)