File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -901,14 +901,19 @@ func (c *Container) gc(now time.Time) {
901901 c .revalidateListens (now , listens )
902902
903903 for srcDst , conn := range c .connectionsActive {
904+ pidFd := PidFd {Pid : conn .Pid , Fd : conn .Fd }
904905 if _ , ok := established [srcDst ]; ! ok {
905906 delete (c .connectionsActive , srcDst )
906- delete (c .connectionsByPidFd , PidFd {Pid : conn .Pid , Fd : conn .Fd })
907+ if conn == c .connectionsByPidFd [pidFd ] {
908+ delete (c .connectionsByPidFd , pidFd )
909+ }
907910 continue
908911 }
909912 if ! conn .Closed .IsZero () && now .Sub (conn .Closed ) > gcInterval {
910913 delete (c .connectionsActive , srcDst )
911- delete (c .connectionsByPidFd , PidFd {Pid : conn .Pid , Fd : conn .Fd })
914+ if conn == c .connectionsByPidFd [pidFd ] {
915+ delete (c .connectionsByPidFd , pidFd )
916+ }
912917 }
913918 }
914919 for dst , at := range c .connectLastAttempt {
You can’t perform that action at this time.
0 commit comments