This version fixes channel ID management that was causing crashes and memory leaks when running multiple threads. It adds cleanup procedures after the remote end goes away, and fixes clean-up for timed out logins. Variable type mismatches and sleep issues under Windows have been addressed.