<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def reconnect(self):
 """Allows reconnection from when a handled TransportException is thrown"""

        try:
            self.conn.close()
        except Exception,e:
            self.logger.warn(e)

        self.createConnection()

        return True