Fix race on reading endpoint data
Fix race on reading endpoint data

Race is with its cleanup.

Signed-off-by: Alexander Morozov <4efb7da3e38416208b41d8021a942884d8a9435c@docker.com>

endocode/docker,aditirajagopal/docker,rhatdan/docker,aidanhs/docker,dgageot/docker,shin-/docker.github.io,dccurtis/docker,cr7pt0gr4ph7/docker,Morsicus/docker,LaynePeng/docker,whuwxl/docker,geekylucas/docker,tophj-ibm/docker,joeuo/docker.github.io,abhinavdahiya/docker,imkin/moby,imkin/moby,mssola/docker,scotttlin/docker,denverdino/denverdino.github.io,abhinavdahiya/docker,noironetworks/docker,hyperhq/hypercli,AkihiroSuda/docker,gnailuy/docker,DoraALin/docker,rremer/moby,maxamillion/docker,ncdc/docker,lixiaobing1/docker,stainboy/docker,swasd/baleno,medallia/docker,vincentwoo/docker,coolljt0725/docker,brahmaroutu/docker,vincentwoo/docker,runcom/docker,Jimmy-Xu/hypercli,cnaize/docker,dsau/docker,Mashimiao/docker,coreos/docker,johnstep/docker.github.io,rkazak/docker,haveatry/docker,naveed-jamil-tenpearls/moby,Syntaxide/docker,vdemeester/docker,laijs/moby,icecrime/docker,sarnautov/moby,izarov/docker,docker/docker.github.io,vdemeester/docker,nghiant2710/docker,BSWANG/denverdino.github.io,davinashreddy/docker,pradipd/moby,carolfh/docker,pecameron/docker,miminar/docker,rancher/docker,kolyshkin/moby,konstruktoid/docker-upstream,michelvocks/docker,srust/docker,mtrmac/docker,pyotr777/docker,BSWANG/denverdino.github.io,eskaaren/docker,Collinux/docker,ZJU-SEL/docker,PatrickLang/moby,icaoweiwei/docker,aduermael/docker.github.io,gschaetz/moby,ffoysal/docker,cnaize/docker,noironetworks/docker,johnstep/docker.github.io,willmtemple/docker,zhangjianfnst/docker,Mokolea/docker,rhatdan/storage,ivansaracino/docker,gdevillele/docker.github.io,LaynePeng/docker,davinashreddy/docker,xuxinkun/docker,JeffBellegarde/docker,jimjag/docker,alexisbellido/docker.github.io,thtanaka/docker,akira-baruah/docker,nguyentm83/docker,Mokolea/docker,twaugh/docker,anujbahuguna/docker,ZJUshuaizhou/docker,ibuildthecloud/docker,jhorwit2/docker,solganik/docker,arun-gupta/docker,Ramzec/docker,erikh/docker,LuisBosquez/docker.github.io,PatrickLang/moby,q384566678/docker,joaofnfernandes/docker.github.io,bfirsh/docker,michelvocks/docker,jzwlqx/denverdino.github.io,stevvooe/docker,crosbymichael/docker,asbjornenge/docker,BrianBland/docker,ColinHebert/docker,jloehel/docker,pramodhkp/moby,ailispaw/docker,sheimi/docker,thaJeztah/docker,docker/docker.github.io,arun-gupta/docker,mstanleyjones/docker,msabansal/docker,isubuz/docker,laijs/docker,mike1729/docker,menglingwei/denverdino.github.io,danix800/docker.github.io,nalind/docker,bluebreezecf/docker,raja-sami-10p/moby,containers/storage,gdevillele/docker.github.io,denverdino/docker.github.io,geekylucas/docker,cyli/docker,portworx/docker,JimGalasyn/docker.github.io,sanjeo/docker,mixja/docker,laijs/docker,harche/docker,johnstep/docker.github.io,tklauser/docker,aduermael/docker.github.io,thtanaka/docker,mkumatag/docker,johnstep/docker.github.io,Shopify/docker,splunk/docker,tmp6154/docker,docker-zh/docker.github.io,hqhq/moby,flavio/docker,dongjoon-hyun/docker,nghiant2710/docker,jlhawn/docker,catinthesky/docker,justyntemme/docker,kyle-wang/docker,bdwill/docker.github.io,menglingwei/denverdino.github.io,jthelin/docker,mkumatag/docker,resin-io/docker,isubuz/docker,aaronlehmann/docker,mike1729/docker,sfsmithcha/docker,raja-sami-10p/moby,naveed-jamil-tenpearls/moby,YujiOshima/docker,yongtang/docker,OnePaaS/docker,BrianBland/docker,mtanlee/docker,mixja/docker,skatsuta/docker,joeuo/docker.github.io,fangyuan930917/docker,thaJeztah/docker.github.io,BSWANG/denverdino.github.io,bluebreezecf/docker,AkihiroSuda/docker,joaofnfernandes/docker.github.io,joeuo/docker.github.io,coolljt0725/docker,AkihiroSuda/docker,pramodhkp/moby,mahak/docker,sanscontext/docker.github.io,PatrickLang/moby,nalind/docker,dsheets/moby,luxas/docker,inatatsu/docker,kerneltime/docker,tagomoris/docker,ndeloof/docker,kerneltime/docker,moby/moby,dsheets/moby,sallyom/docker,jongiddy/docker,raja-sami-10p/moby,thaJeztah/docker,bonczj/moby-json-file-logger,menglingwei/denverdino.github.io,sheimi/docker,tmp6154/docker,gnailuy/docker,imkin/moby,containers/storage,tianon/docker,darrenstahlmsft/docker,moul/docker,jlebon/docker,noxiouz/docker,rhatdan/storage,asbjornenge/docker,HideoYamauchi/docker,achanda/docker,tkopczynski/docker,HuKeping/docker,tpounds/docker,gao-feng/docker,charleszheng44/moby,TrumanLing/docker,Ramzec/docker,solganik/docker,portworx/docker,ckeyer/docker,YujiOshima/docker,nigelpoulton/docker,YuPengZTE/docker,HideoYamauchi/docker,moby/moby,LaynePeng/docker,kimh/docker,toli/docker,dccurtis/docker,q384566678/docker,amatsus/docker,denverdino/docker.github.io,xiekeyang/docker,djs55/docker,prertik/docker,sanjeo/docker,gigidwan/docker,yummypeng/docker,mikedougherty/docker,phiroict/docker,londoncalling/docker.github.io,wenchma/docker,pecameron/docker,dperny/docker,gjaskiewicz/moby,isubuz/docker,dnephin/docker,aditirajagopal/docker,carolfh/docker,LuisBosquez/docker.github.io,kunalkushwaha/docker,flavio/docker,cr7pt0gr4ph7/docker,ripcurld0/moby,anweiss/docker.github.io,gjaskiewicz/moby,solganik/docker,kunalkushwaha/docker,xiekeyang/docker,ndeloof/docker,JMesser81/docker,denverdino/docker.github.io,gschaetz/moby,cyli/docker,13W/docker,rkazak/docker,mtanlee/docker,alexisbellido/docker.github.io,upmio/docker,projectatomic/docker,sdurrheimer/docker,scotttlin/docker,denverdino/denverdino.github.io,medallia/docker,ZJUshuaizhou/docker,csfrancis/docker,splunk/docker,vincentwoo/docker,yasiramin10p/moby,cpuguy83/docker,bdwill/docker.github.io,mbanikazemi/docker,jc-m/docker,hqhq/moby,laijs/moby,justincormack/docker,xiaods/docker,toli/docker,wenchma/docker,icaoweiwei/docker,jwhonce/docker,xuxinkun/docker,akira-baruah/docker,shubheksha/docker.github.io,michelvocks/docker,charleszheng44/moby,cyphar/docker,alexisbellido/docker.github.io,toli/docker,thaJeztah/docker.github.io,mahak/docker,lixiaobing10051267/docker,achanda/docker,tklauser/docker,unclejack/docker,jlebon/docker,ailispaw/docker,yp-engineering/docker,tpounds/docker,kolyshkin/docker,thaJeztah/docker.github.io,YujiOshima/docker,mgoelzer/docker,dperny/docker,jecarey/docker,amatsus/docker,konstruktoid/docker-1,crosbymichael/docker,aduermael/docker.github.io,hallyn/docker,darrenstahlmsft/docker,yummypeng/docker,sheimi/docker,prertik/docker,mstanleyjones/docker,mgoelzer/docker,konstruktoid/docker-upstream,mikedougherty/docker,POLJM242/docker,danix800/docker.github.io,ckeyer/docker,afein/docker,gdevillele/docker.github.io,michael-holzheu/docker,LuisBosquez/docker.github.io,justyntemme/docker,resin-io/docker,duglin/docker,moul/docker,umerazad/docker,charleswhchan/docker,danyalKhaliq10p/moby,joeuo/docker.github.io,fangyuan930917/docker,Mokolea/docker,13W/docker,SvenDowideit/docker,tophj-ibm/moby,gigidwan/docker,mathewkoshy493/docker,aidanhs/docker,londoncalling/docker.github.io,yosifkit/docker,rhatdan/docker,ibuildthecloud/docker,sunyuan3/docker,OnePaaS/docker,nawawi/docker,bearstech/moby,sean-jc/docker,sarnautov/moby,cpuguy83/docker,jhorwit2/docker,tophj-ibm/moby,hypriot/docker,tianon/docker,swasd/baleno,mstanleyjones/docker,msabansal/docker,rancher/docker,13W/docker,fcrisciani/docker,londoncalling/docker.github.io,dsau/docker,unclejack/docker,x1022as/docker,afein/docker,ivansaracino/docker,laijs/docker,bdwill/docker.github.io,gjaskiewicz/moby,kencochrane/docker,eskaaren/docker,cpuguy83/docker,jecarey/docker,anweiss/docker.github.io,sanscontext/docker.github.io,contiv/docker,14rcole/docker,jlhawn/docker,gao-feng/docker,gdevillele/docker.github.io,denverdino/denverdino.github.io,endocode/docker,moby/moby,portworx/docker,dsheets/moby,nguyentm83/docker,thaJeztah/docker.github.io,ripcurld0/moby,menglingwei/denverdino.github.io,moypray/docker,amatsus/docker,whuwxl/docker,izarov/docker,rremer/moby,diogomonica/docker,jameszhan/docker,phiroict/docker,moxiegirl/docker,kyle-wang/docker,shubheksha/docker.github.io,nawawi/docker,nawawi/docker,Jimmy-Xu/hypercli,supasate/docker,konstruktoid/docker-upstream,docker/docker.github.io,KarthikNayak/docker,lixiaobing1/docker,mtesselH/docker,laijs/moby,dccurtis/docker,shin-/docker.github.io,alexisbellido/docker.github.io,yp-engineering/docker,stevvooe/docker,TheBigBear/docker,ripcurld0/moby,dmcgowan/docker,tklauser/docker,jimjag/docker,cr7pt0gr4ph7/docker,shhsu/docker,SaiedKazemi/docker,Altiscale/docker,Collinux/docker,LuisBosquez/docker.github.io,docker/docker.github.io,maxamillion/docker,dims/docker,HuKeping/docker,prertik/docker,vijaykilari/docker,tophj-ibm/docker,shubheksha/docker.github.io,rhardih/docker,kojiromike/docker,sallyom/docker,jloehel/docker,rillig/docker.github.io,bearstech/moby,sean-jc/docker,ffoysal/docker,darrenstahlmsft/moby,rhatdan/docker,kerneltime/docker,rhatdan/storage,docker/docker,pradipd/moby,erikstmartin/docker,jzwlqx/denverdino.github.io,mtanlee/docker,imeoer/hypercli,Test-Betta-Inc/psychic-barnacle,xuxinkun/docker,fsoppelsa/docker,HackToday/docker,projectatomic/docker,vijaykilari/docker,mikebrow/docker,scollier/docker,ckeyer/docker,upmio/docker,afein/docker,hypriot/docker,lixiaobing1/docker,mtrmac/docker,jvanz/docker,alfred-landrum/docker,danix800/docker.github.io,Mashimiao/docker,jwhonce/docker,willmtemple/docker,nghiant2710/docker,johnstep/moby-moby,bluebreezecf/docker,docker-zh/docker.github.io,asbjornenge/docker,ajaymdesai/docker,fangyuan930917/docker,sallyom/docker,moxiegirl/docker,shubheksha/docker.github.io,HackToday/docker,docker-zh/docker.github.io,tonistiigi/docker,bfirsh/docker,troy0820/docker.github.io,troy0820/docker.github.io,mahak/docker,abhinavdahiya/docker,x1022as/docker,srust/docker,skatsuta/docker,supasate/docker,Ramzec/docker,aidanhs/docker,jloehel/docker,bearstech/moby,noxiouz/docker,cloudflare/docker,runcom/docker,msabansal/docker,Jimmy-Xu/hypercli,allencloud/docker,hypriot/docker,stainboy/docker,jzwlqx/denverdino.github.io,denverdino/denverdino.github.io,jongiddy/docker,BenHall/docker,dongjoon-hyun/docker,ibuildthecloud/docker,madhanrm/docker,londoncalling/docker.github.io,denverdino/docker.github.io,13W/docker,docker/docker,TrumanLing/docker,jvanz/docker,Tenk42/docker,rillig/docker.github.io,phiroict/docker,cnaize/docker,sfsmithcha/docker,phiroict/docker,qudongfang/docker,londoncalling/docker.github.io,BrianBland/docker,BenHall/docker,stevvooe/docker,luxas/docker,mohmost12/docker,skatsuta/docker,yp-engineering/docker,cloudflare/docker,kyle-wang/docker,JimGalasyn/docker.github.io,rhardih/docker,mssola/docker,tmp6154/docker,shin-/docker.github.io,trebonian/docker,JMesser81/docker,bdwill/docker.github.io,Mashimiao/docker,ibuildthecloud/docker,ajaymdesai/docker,bearstech/moby,errordeveloper/docker,izarov/docker,yongtang/docker,medallia/docker,tophj-ibm/docker,dongjoon-hyun/docker,Shopify/docker,fcrisciani/docker,docker-zh/docker.github.io,cyli/docker,dmcgowan/docker,tpounds/docker,harche/docker,jwhonce/docker,q384566678/docker,charleszheng44/moby,shin-/docker.github.io,Test-Betta-Inc/psychic-barnacle,rillig/docker.github.io,brahmaroutu/docker,allencloud/docker,estesp/docker,13W/docker,errordeveloper/docker,miminar/docker,erikh/docker,bfirsh/docker,vijaykilari/docker,kencochrane/docker,endophage/docker,anujbahuguna/docker,kolyshkin/docker,troy0820/docker.github.io,twaugh/docker,nalind/docker,cloudflare/docker,anortef/docker,duglin/docker,kolyshkin/moby,dperny/docker,joaofnfernandes/docker.github.io,ncdc/docker,YuPengZTE/docker,unclejack/docker,anortef/docker,mathewkoshy493/docker,moul/docker,lixiaobing10051267/docker,TheBigBear/docker,x1022as/docker,moxiegirl/docker,sean-jc/docker,mbanikazemi/docker,geekylucas/docker,runcom/docker,xiaods/docker,sanscontext/docker.github.io,TheBigBear/docker,cmehay/docker-1,mike1729/docker,johnstep/moby-moby,jvanz/docker,jimjag/docker,denverdino/docker.github.io,hyperhq/hypercli,dmcgowan/docker,Altiscale/docker,docker-zh/docker.github.io,davinashreddy/docker,menglingwei/denverdino.github.io,shishir-a412ed/docker,shishir-a412ed/docker,erikh/docker,tonistiigi/docker,cpuguy83/docker,hustcat/docker,yongtang/docker,liaoqingwei/docker,YuPengZTE/docker,djs55/docker,shin-/docker.github.io,TrumanLing/docker,ndeloof/docker,JeffBellegarde/docker,gdevillele/docker.github.io,trebonian/docker,coolljt0725/docker,icaoweiwei/docker,bonczj/moby-json-file-logger,shhsu/docker,srust/docker,inatatsu/docker,willmtemple/docker,ZJUshuaizhou/docker,noxiouz/docker,madhanrm/docker,bdwill/docker.github.io,Syntaxide/docker,gschaetz/moby,erikstmartin/docker,paralin/docker,nigelpoulton/docker,jlhawn/docker,kencochrane/docker,catinthesky/docker,anujbahuguna/docker,kolyshkin/moby,DoraALin/docker,cmehay/docker-1,fcrisciani/docker,whuwxl/docker,haveatry/docker,wenchma/docker,docker/docker,fsoppelsa/docker,mkumatag/docker,trebonian/docker,konstruktoid/docker-1,estesp/docker,csfrancis/docker,denverdino/denverdino.github.io,mixja/docker,sdurrheimer/docker,yosifkit/docker,supasate/docker,KingEmet/docker,jzwlqx/denverdino.github.io,sfsmithcha/docker,kunalkushwaha/docker,madhanrm/docker,fsoppelsa/docker,JimGalasyn/docker.github.io,mtesselH/docker,inatatsu/docker,JimGalasyn/docker.github.io,KingEmet/docker,KarthikNayak/docker,imeoer/hypercli,carolfh/docker,Tenk42/docker,Microsoft/docker,medallia/docker,erikstmartin/docker,aditirajagopal/docker,yosifkit/docker,xiaods/docker,haveatry/docker,ivansaracino/docker,14rcole/docker,moby/moby,BSWANG/denverdino.github.io,paralin/docker,contiv/docker,anweiss/docker.github.io,SvenDowideit/docker,xiekeyang/docker,mohmost12/docker,jhorwit2/docker,jameszhan/docker,estesp/docker,thaJeztah/docker,kimh/docker,Microsoft/docker,gnailuy/docker,miminar/docker,resin-io/docker,jzwlqx/denverdino.github.io,dims/docker,docker/docker.github.io,Altiscale/docker,joeuo/docker.github.io,ailispaw/docker,endophage/docker,dgageot/docker,icecrime/docker,Ramzec/docker,tkopczynski/docker,SaiedKazemi/docker,yosifkit/docker,rillig/docker.github.io,moypray/docker,jlebon/docker,dnephin/docker,JimGalasyn/docker.github.io,djs55/docker,kimh/docker,cmehay/docker-1,csfrancis/docker,naveed-jamil-tenpearls/moby,hyperhq/hypercli,Shopify/docker,scollier/docker,tonistiigi/docker,Mokolea/docker,moypray/docker,michael-holzheu/docker,sunyuan3/docker,ffoysal/docker,konstruktoid/docker-1,danyalKhaliq10p/moby,pramodhkp/moby,zhuguihua/docker,dsau/docker,gigidwan/docker,imeoer/hypercli,allencloud/docker,luxas/docker,eskaaren/docker,sunyuan3/docker,bonczj/moby-json-file-logger,pradipd/moby,zhangjianfnst/docker,sarnautov/moby,jimjag/docker,yasiramin10p/moby,qudongfang/docker,lixiaobing10051267/docker,thtanaka/docker,rkazak/docker,charleswhchan/docker,coreos/docker,liaoqingwei/docker,justyntemme/docker,DoraALin/docker,mohmost12/docker,stainboy/docker,duglin/docker,mahak/docker,alfred-landrum/docker,shubheksha/docker.github.io,ibuildthecloud/docker,scotttlin/docker,swasd/baleno,JeffBellegarde/docker,AkihiroSuda/docker,mathewkoshy493/docker,mssola/docker,tagomoris/docker,HackToday/docker,kojiromike/docker,POLJM242/docker,aduermael/docker.github.io,OnePaaS/docker,sdurrheimer/docker,sanscontext/docker.github.io,justincormack/docker,dgageot/docker,nigelpoulton/docker,HideoYamauchi/docker,danyalKhaliq10p/moby,thaJeztah/docker,jc-m/docker,hustcat/docker,Test-Betta-Inc/psychic-barnacle,paralin/docker,zhangjianfnst/docker,KingEmet/docker,hustcat/docker,joaofnfernandes/docker.github.io,sanscontext/docker.github.io,joaofnfernandes/docker.github.io,mgoelzer/docker,darrenstahlmsft/moby,alexisbellido/docker.github.io,ncdc/docker,paralin/docker,pyotr777/docker,containers/storage,diogomonica/docker,zhuguihua/docker,BSWANG/denverdino.github.io,jongiddy/docker,contiv/docker,gao-feng/docker,maxamillion/docker,Tenk42/docker,charleswhchan/docker,Collinux/docker,mbanikazemi/docker,umerazad/docker,mtrmac/docker,SvenDowideit/docker,flavio/docker,rancher/docker,mikebrow/docker,catinthesky/docker,coreos/docker,gnailuy/docker,sterchelen/docker,hallyn/docker,zhuguihua/docker,jameszhan/docker,projectatomic/docker,ZJU-SEL/docker,rremer/moby,hallyn/docker,flavio/docker,crosbymichael/docker,cyphar/docker,umerazad/docker,LuisBosquez/docker.github.io,nawawi/docker,tkopczynski/docker,SaiedKazemi/docker,mikedougherty/docker,shishir-a412ed/docker,jthelin/docker,darrenstahlmsft/moby,endocode/docker,KarthikNayak/docker,tophj-ibm/moby,sterchelen/docker,jc-m/docker,thaJeztah/docker.github.io,harche/docker,icecrime/docker,endophage/docker,achanda/docker,pecameron/docker,nalind/docker,johnstep/moby-moby,ColinHebert/docker,upmio/docker,JMesser81/docker,anweiss/docker.github.io,sterchelen/docker,mtesselH/docker,twaugh/docker,troy0820/docker.github.io,HuKeping/docker,shhsu/docker,pyotr777/docker,ajaymdesai/docker,hqhq/moby,Morsicus/docker,johnstep/docker.github.io,michael-holzheu/docker,phiroict/docker,justincormack/docker,tagomoris/docker,mikebrow/docker,Syntaxide/docker,darrenstahlmsft/docker,aaronlehmann/docker,vdemeester/docker,diogomonica/docker,qudongfang/docker,errordeveloper/docker,noironetworks/docker,Morsicus/docker,kojiromike/docker,alfred-landrum/docker,aaronlehmann/docker,splunk/docker,konstruktoid/docker-upstream,danix800/docker.github.io,dnephin/docker,anortef/docker,ColinHebert/docker,yasiramin10p/moby,cyphar/docker,trebonian/docker,yummypeng/docker,moul/docker,Microsoft/docker,arun-gupta/docker,BenHall/docker,liaoqingwei/docker,anweiss/docker.github.io,dims/docker,sanjeo/docker,brahmaroutu/docker