Add close to client for graceful exit.
Merge pull request #38 from gabrielf/features/graceful-exit

Add close to client for graceful exit.