148 selectErrors = 0 |
148 selectErrors = 0 |
149 while selectErrors <= 10: # selected arbitrarily |
149 while selectErrors <= 10: # selected arbitrarily |
150 try: |
150 try: |
151 rrdy, wrdy, xrdy = select.select([self.__connection], [], []) |
151 rrdy, wrdy, xrdy = select.select([self.__connection], [], []) |
152 |
152 |
153 # Just waiting for self.__connection. Therefor no check |
153 # Just waiting for self.__connection. Therefore no check |
154 # needed. |
154 # needed. |
155 method, params = self.__receiveJson() |
155 method, params = self.__receiveJson() |
156 if method is None: |
156 if method is None: |
157 selectErrors += 1 |
157 selectErrors += 1 |
158 elif method == "Exit": |
158 elif method == "Exit": |