server with global wait for shutdown
Merge pull request #47 from wongak/server_cancel

server with global wait for shutdown