def do_handshake(self): while True: try: self._connection.do_handshake() break except (WantReadError, WantX509LookupError, WantWriteError): sys.exc_clear() wait_readwrite(self._sock.fileno(), timeout=self._timeout)
def _poll(self, msg_id: int, timeout: Optional[float] = None) -> Any: while True: res = self.get_result(msg_id) if res is not None: return res wait_readwrite(self.fileno(), timeout=timeout)
def _poll(self, msg_id, timeout=None): while True: res = self.get_result(msg_id) if res is not None: return res wait_readwrite(self.fileno(), timeout=timeout)