-
Kirill Smelkov authored
From https://github.com/zopefoundation/ZEO/pull/182#issuecomment-826630195 : For `protocol.fut('lastTransaction')` vs `ClientDisconnected` in verify - I would suggest to do the following instead: just move up the try/except that is _already_ covering the code in verify a bit up - to also cover that lastTransaction call. This try / except already catches `except Exception` and does `self.register_failed(protocol, exc)` on a failure: https://github.com/zopefoundation/ZEO/blob/1070adcbd17b83b9515c43b48ca38687783793e4/src/ZEO/asyncio/client.py#L488-L535 So if we just move its beginning `try` a bit up in here to also cover `lastTransaction` call here: https://github.com/zopefoundation/ZEO/blob/1070adcbd17b83b9515c43b48ca38687783793e4/src/ZEO/asyncio/client.py#L485-L488 it will work out automatically. It will work correctly because `ClientDisconnected` is inheriting as ClientDisconnected -> ClientStorageError -> StorageError -> POSError -> Exception It is also more logical to wrap the whole operation in verify in such a try/except block, so that if _anything_ at _any_ point fails, we mark the whole operation as failed.
171c2a60