File tree 1 file changed +7
-2
lines changed
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) {
901
901
c .revalidateListens (now , listens )
902
902
903
903
for srcDst , conn := range c .connectionsActive {
904
+ pidFd := PidFd {Pid : conn .Pid , Fd : conn .Fd }
904
905
if _ , ok := established [srcDst ]; ! ok {
905
906
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
+ }
907
910
continue
908
911
}
909
912
if ! conn .Closed .IsZero () && now .Sub (conn .Closed ) > gcInterval {
910
913
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
+ }
912
917
}
913
918
}
914
919
for dst , at := range c .connectLastAttempt {
You can’t perform that action at this time.
0 commit comments