The first publish and wait doesn't really serve any purpose.
Commit 1553158 from Mark Miller in branch 'dev/branches/branch_4x'
[ https://svn.apache.org/r1553158 ]
SOLR-5574: CoreContainer shutdown publishes all nodes as down and waits to see that and then again publishes all nodes as down.
Commit 1553157 from Mark Miller in branch 'dev/trunk'
[ https://svn.apache.org/r1553157 ]