'Force a reconnection of the bot protocol. This requires
de-registering the session and then reattaching a new one,
otherwise you end up with an ever growing number of bot
sessions.'

def reconnect(self):

    self.bot.stopping = True
    self.bot.transport.loseConnection()
    self.sessionhandler.server_disconnect(self.bot)
    self.start()
