Fix Client Reconnect Logic

Fixing the reconnect logic of the TCP client so it can't freak out and swallow all possible TCP connections. Also added in the ability to optionally log debug info.

cc @squamos