Merged in master (pull request #2)
Fix an issue where the bot would hang infinitely while trying to reconnect.
Fix an issue where the bot would hang infinitely while trying to reconnect.