Fix CLI to exit when server is shutdown
Merge pull request #156 from kkka/exit-when-server-shutdown

Fix CLI to exit when server is shutdown