fixed client socket not being closed in the main thread
Merge pull request #3 from dan-hill/fix-debug-message-overflow

fixed client socket not being closed in the main thread