When a connection is lost, tornado will callback to the twisted object to tell it about the failure.
The problem is it differentiates read failures and write failures using the readConnectionLost and writeConnectionLost methods.
Our TxIOEvent class actually only has a generic connectionLost method.
To make the API compatible without breaking anything or changing behaviour for anything else, we should add readConnectionLost and writeConnectionLost methods which in turn just call the existing connectionLost method.
Example of the error which will crash the coroutine:
|For Gerrit Dashboard: PYCBC-463|
|87849,2||PYCBC-463: Make TxIOEvent API compatible with Tornado||master||couchbase-python-client||Status: MERGED||+2||+1|