(handler, client)
| 40 | } |
| 41 | |
| 42 | async withOperationClient (handler, client) { |
| 43 | if (client) { |
| 44 | return handler(client) |
| 45 | } |
| 46 | const operationClient = await this.createOperationClient() |
| 47 | try { |
| 48 | return await handler(operationClient) |
| 49 | } finally { |
| 50 | await operationClient.close().catch(() => {}) |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | async connect (initOptions) { |
| 55 | this.initOptions = { |