Close a returned connection if necessary. Return `!True if the connection was closed.
(self, conn: CT)
| 359 | self._return_connection(conn, from_getconn=from_getconn) |
| 360 | |
| 361 | def _maybe_close_connection(self, conn: CT) -> bool: |
| 362 | """Close a returned connection if necessary. |
| 363 | |
| 364 | Return `!True if the connection was closed. |
| 365 | """ |
| 366 | # If the pool is closed just close the connection instead of returning |
| 367 | # it to the pool. For extra refcare remove the pool reference from it. |
| 368 | if not self._closed: |
| 369 | return False |
| 370 | |
| 371 | self._close_connection(conn) |
| 372 | return True |
| 373 | |
| 374 | def open(self, wait: bool = False, timeout: float = 30.0) -> None: |
| 375 | """Open the pool by starting connecting and and accepting clients. |
no test coverage detected