def run(self):
        self.running = True
        self.poly.connect()
        counter = 0
        try:
            while self.running:
                time.sleep(self.shortpoll)
                self.poll()
                counter += self.shortpoll

                if counter >= self.longpoll:
                    self.long_poll()
                    counter = 0

        except KeyboardInterrupt:
            self.on_exit()

        self.poly.exit()
Convert a possibly multibyte string to a safely splittable format.
dataset/ETHPy150Open UniversalDevicesInc/Polyglot/polyglot/nodeserver_api.py/NodeServer.run--crossover with--dataset/ETHPy150Open babble/babble/include/jython/Lib/email/charset.py/Charset.to_splittable