Fixed early client.close() issue
Merge pull request #3 from stanvit/master

Early client.close() and potential upstream.close() issue