code: def disconnect(self):
          
          self.connState = Client.DISCONNECTED
          if self.conn is not None:
              self._logger.info('Disconnecting')
              self.conn.disconnect()
              self.wrapper.connectionClosed()
              self.reset()
docs: Disconnect from IB connection.