Fix for situation where swarm leave causes wait forever for agent to stop
Fix for situation where swarm leave causes wait forever for agent to stop

In this case the message to stop the agent is never actually sent
because the swarm node is nil

Signed-off-by: Kyle Wuolle <9543d0ec92d98a8d3f3096b1fdf5f6baca38b3f0@gmail.com>
Signed-off-by: Sebastiaan van Stijn <64b2b6d12bfe4baae7dad3d018f8cbf6b0e7a044@gone.nl>

SvenDowideit/docker,gnailuy/docker,crosbymichael/docker,nawawi/docker,vdemeester/docker,cpuguy83/docker,cpuguy83/docker,kolyshkin/moby,djs55/docker,flavio/docker,jthelin/docker,dims/docker,jwhonce/docker,AkihiroSuda/docker,rremer/moby,AkihiroSuda/docker,moby/moby,docker/docker,flavio/docker,gnailuy/docker,justincormack/docker,nalind/docker,justincormack/docker,tmp6154/docker,kojiromike/docker,jameszhan/docker,pradipd/moby,dims/docker,flavio/docker,moul/docker,bearstech/moby,konstruktoid/docker-upstream,yosifkit/docker,unclejack/docker,paralin/docker,moby/moby,mahak/docker,bearstech/moby,jwhonce/docker,unclejack/docker,konstruktoid/docker-upstream,SvenDowideit/docker,kolyshkin/moby,docker/docker,konstruktoid/docker-upstream,kolyshkin/moby,docker/docker,yongtang/docker,yongtang/docker,thaJeztah/docker,pradipd/moby,jvanz/docker,dims/docker,gnailuy/docker,mahak/docker,ibuildthecloud/docker,SvenDowideit/docker,jvanz/docker,konstruktoid/docker-1,pradipd/moby,tmp6154/docker,nawawi/docker,mahak/docker,AkihiroSuda/docker,jimjag/docker,konstruktoid/docker-upstream,Mokolea/docker,jameszhan/docker,jimjag/docker,nawawi/docker,crosbymichael/docker,jwhonce/docker,gnailuy/docker,yosifkit/docker,trebonian/docker,Ramzec/docker,crosbymichael/docker,jimjag/docker,ibuildthecloud/docker,moul/docker,thaJeztah/docker,trebonian/docker,jthelin/docker,tmp6154/docker,justincormack/docker,AkihiroSuda/docker,jvanz/docker,mikebrow/docker,paralin/docker,nalind/docker,vdemeester/docker,Ramzec/docker,paralin/docker,unclejack/docker,kojiromike/docker,Mokolea/docker,djs55/docker,nalind/docker,yosifkit/docker,moul/docker,yongtang/docker,cpuguy83/docker,mikebrow/docker,konstruktoid/docker-1,moul/docker,moby/moby,bearstech/moby,rremer/moby,Ramzec/docker,trebonian/docker,trebonian/docker,flavio/docker,kojiromike/docker,jlhawn/docker,jlhawn/docker,estesp/docker,cpuguy83/docker,yosifkit/docker,nawawi/docker,Mokolea/docker,jimjag/docker,thaJeztah/docker,jlhawn/docker,Ramzec/docker,bearstech/moby,vdemeester/docker,ibuildthecloud/docker,estesp/docker,mahak/docker,mikebrow/docker,Mokolea/docker,nalind/docker,djs55/docker,thaJeztah/docker,estesp/docker,ibuildthecloud/docker,paralin/docker,konstruktoid/docker-1,jameszhan/docker,moby/moby,ibuildthecloud/docker,rremer/moby