(self, exc)
| 981 | raise NotImplementedError() |
| 982 | |
| 983 | def defunct(self, exc): |
| 984 | with self.lock: |
| 985 | if self.is_defunct or self.is_closed: |
| 986 | return |
| 987 | self.is_defunct = True |
| 988 | |
| 989 | exc_info = sys.exc_info() |
| 990 | # if we are not handling an exception, just use the passed exception, and don't try to format exc_info with the message |
| 991 | if any(exc_info): |
| 992 | log.debug("Defuncting connection (%s) to %s:", |
| 993 | id(self), self.endpoint, exc_info=exc_info) |
| 994 | else: |
| 995 | log.debug("Defuncting connection (%s) to %s: %s", |
| 996 | id(self), self.endpoint, exc) |
| 997 | |
| 998 | self.last_error = exc |
| 999 | self.close() |
| 1000 | self.error_all_cp_sessions(exc) |
| 1001 | self.error_all_requests(exc) |
| 1002 | self.connected_event.set() |
| 1003 | return exc |
| 1004 | |
| 1005 | def error_all_cp_sessions(self, exc): |
| 1006 | stream_ids = list(self._continuous_paging_sessions.keys()) |
no test coverage detected