runtime: should not send duplicate task exit event
If the shim has been killed and ttrpc connection has been closed, the shimErr will not be nil. For this case, the event subscriber, like moby/moby, might have received the exit or delete events. Just in case, we should allow ttrpc-callback-on-close to send the exit and delete events again. And the exit status will depend on result of shimV2.Delete. If not, the shim has been delivered the exit and delete events. So we should remove the task record and prevent duplicate events from ttrpc-callback-on-close. Fix: #4769 Signed-off-by: Wei Fu <fuweid89@gmail.com>
This commit is contained in:
@@ -30,7 +30,6 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
// Register the typeurl
|
||||
"github.com/containerd/containerd/cio"
|
||||
"github.com/containerd/containerd/containers"
|
||||
"github.com/containerd/containerd/namespaces"
|
||||
|
Reference in New Issue
Block a user