After calling Node.Stop(), Node.WaitForDone() exits gracefully.

Which means Node.WaitForDone() waits for all connections exit.
Fixed infinite loop in node.loop()