diff --git a/fdb/fbcore.py b/fdb/fbcore.py index 61f1c04..7437b43 100644 --- a/fdb/fbcore.py +++ b/fdb/fbcore.py @@ -1737,6 +1737,7 @@ def __wait_for_events(self): self.buf_length,self.event_buf, self.__callback,self.result_buf) if db_api_error(self._isc_status): + self.close() raise exception_from_status(DatabaseError, self._isc_status, "Error while waiting for events:") def count_and_reregister(self):