Description
If you do:
graph=Graph() connection = DriverRemoteConnection(endpoint,'g', transport_factory=lambda:AiohttpTransport(call_from_event_loop=True)) g = graph.traversal().withRemote(connection) tx = g.tx() gtx = tx.begin() try: id1 = gtx.addV('id1').next() id2 = gtx.addV('id2').next() except Exception as e: tx.rollback() else: print(id1,id2) connection.close()
The connection in tx won't be closed and it will be up to the server to timeout the connection in its normal fashion. While this isn't the expected way tx should be used, it is a bit of a hole someone could stumble in. Seems like, the close of the parent connection should also close any spawned child connections. It might be worth looking at Java to see how the implementation works there as well.