(pool: ConnectionPool, connection: Connection)
| 563 | } |
| 564 | |
| 565 | function connectionIsStale(pool: ConnectionPool, connection: Connection) { |
| 566 | if (connection.serviceId) { |
| 567 | return ( |
| 568 | connection.generation !== pool.serviceGenerations.get(connection.serviceId.toHexString()) |
| 569 | ); |
| 570 | } |
| 571 | |
| 572 | return connection.generation !== pool.generation; |
| 573 | } |
| 574 | |
| 575 | function inActiveTransaction(session: ClientSession | undefined, cmd: Document) { |
| 576 | return session && session.inTransaction() && !isTransactionCommand(cmd); |
no test coverage detected